File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ module Runtime_4 = struct
127
127
(* Unimplemented functions *)
128
128
let not_implemented () =
129
129
failwith " Multi-domain functionality not supported in runtime4"
130
- type !'a t
130
+ type !'a t : value mod portable contended with 'a
131
131
type id = int
132
132
let spawn' _ = not_implemented ()
133
133
let join _ = not_implemented ()
@@ -150,12 +150,12 @@ module Runtime_5 = struct
150
150
| Running
151
151
| Finished of ('a , exn ) result [@ warning "-unused-constructor" ]
152
152
153
- type 'a term_sync = {
153
+ type 'a term_sync : value mod portable contended with 'a = {
154
154
(* protected by [mut] *)
155
155
mutable state : 'a state [@ warning "-unused-field" ] ;
156
156
mut : Mutex .t ;
157
157
cond : Condition .t ;
158
- }
158
+ } [ @@ unsafe_allow_any_mode_crossing]
159
159
160
160
external spawn : (unit -> 'a ) @ portable once -> 'a term_sync -> t @@ portable
161
161
= " caml_domain_spawn"
@@ -472,7 +472,7 @@ module type S = sig
472
472
val init : unit -> unit
473
473
end
474
474
475
- type !'a t
475
+ type !'a t : value mod portable contended with 'a
476
476
val spawn' : (DLS.Access .t -> 'a ) @ portable once -> 'a t @@ portable
477
477
val join : 'a t -> 'a @@ portable
478
478
type id = private int
Original file line number Diff line number Diff line change 27
27
28
28
@since 5.0 *)
29
29
30
- type !'a t
30
+ type !'a t : value mod portable contended with 'a
31
31
(* * A domain of type ['a t] runs independently, eventually producing a
32
32
result of type 'a, or an exception *)
33
33
You can’t perform that action at this time.
0 commit comments