test: move t_chan_train to effect-based tests

This commit is contained in:
Simon Cruanes 2024-09-25 21:32:59 -04:00
parent e7b4223332
commit 3b8b4d040a
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
3 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,6 @@
t_futs1
t_tree_futs
t_props
t_chan_train
t_resource
t_unfair
t_ws_deque

View file

@ -3,6 +3,7 @@
t_fib1
t_futs1
t_many
t_chan_train
t_fib_fork_join
t_fib_fork_join_all
t_sort

View file

@ -10,10 +10,10 @@ type event =
| E_close
let mk_chan (ic : event Chan.t) : event Chan.t =
let out = Chan.create () in
let out = Chan.create ~max_size:16 () in
let rec loop () =
let* ev = Chan.pop ic in
let ev = Chan.pop ic in
Chan.push out ev;
match ev with
| E_close -> Fut.return ()
@ -44,7 +44,7 @@ let run () =
(* start trains *)
let trains =
List.init n_trains (fun _ ->
let c = Chan.create () in
let c = Chan.create ~max_size:16 () in
let out = mk_train len_train c in
c, out)
in