File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 4747 alcotest
4848 domain_shims
4949 picos_std.event
50+ picos_std.finally
5051 picos_std.structured
5152 picos_std.sync
5253 test_scheduler
248249 alcotest
249250 picos
250251 picos_aux.mpscq
252+ picos_std.finally
251253 picos_std.structured
252254 picos_std.sync
253255 test_scheduler
Original file line number Diff line number Diff line change 11open Picos_std_event
2+ open Picos_std_finally
23open Picos_std_structured
34open Picos_std_sync
45module Mpscq = Picos_aux_mpscq
@@ -8,11 +9,11 @@ let check join_after ?callstack ?on_return scope =
89 let open Picos in
910 let fiber = Fiber. current () in
1011 let before = Fiber. get_computation fiber in
11- let finally () =
12+ let check_computation_was_scoped () =
1213 let after = Fiber. get_computation fiber in
1314 assert (before == after)
1415 in
15- Fun. protect ~finally @@ fun () ->
16+ lastly check_computation_was_scoped @@ fun () ->
1617 join_after ?callstack ?on_return @@ fun bundle ->
1718 let during = Fiber. get_computation fiber in
1819 assert (before != during);
Original file line number Diff line number Diff line change 11open Picos
22open Picos_std_event
3- open Picos_std_sync
3+ open Picos_std_finally
44open Picos_std_structured
5+ open Picos_std_sync
56
67let msgs = ref []
78let empty_bt = Printexc. get_callstack 0
@@ -131,7 +132,7 @@ let test_mutex_and_condition_cancelation () =
131132 let hard_deadline = Unix. gettimeofday () +. 120.0 in
132133
133134 let main i () =
134- Fun. protect ~finally: (fun () -> Atomic. decr exit) @@ fun () ->
135+ lastly (fun () -> Atomic. decr exit) @@ fun () ->
135136 Test_scheduler. run @@ fun () ->
136137 let state = Random.State. make_self_init () in
137138 let fiber = Fiber. current () in
You can’t perform that action at this time.
0 commit comments