blob: 34b034a8e8db408ca47fe758e44bcdf096558ce1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
(* TEST
include runtime_events
*)
open Runtime_events
let got_minor = ref false
let () =
start ();
for i = 0 to 256 do
Domain.join (Domain.spawn (fun _ -> ()))
done;
let cursor = create_cursor None in
let runtime_begin domain_id ts phase =
match phase with
| EV_MINOR ->
got_minor := true
| _ -> () in
let callbacks = Callbacks.create ~runtime_begin ()
in
Domain.join (Domain.spawn (fun _ -> Gc.full_major ()));
ignore(read_poll cursor callbacks (Some 1_000_000));
assert(!got_minor)
|