mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-05 19:00:33 -05:00
test: move t_chan_train to effect-based tests
This commit is contained in:
parent
e7b4223332
commit
3b8b4d040a
3 changed files with 4 additions and 4 deletions
|
|
@ -7,7 +7,6 @@
|
|||
t_futs1
|
||||
t_tree_futs
|
||||
t_props
|
||||
t_chan_train
|
||||
t_resource
|
||||
t_unfair
|
||||
t_ws_deque
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
t_fib1
|
||||
t_futs1
|
||||
t_many
|
||||
t_chan_train
|
||||
t_fib_fork_join
|
||||
t_fib_fork_join_all
|
||||
t_sort
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Add table
Reference in a new issue