Skip to content

Commit

Permalink
fixup! Benchmark: add ezbechamel_concurrent
Browse files Browse the repository at this point in the history
  • Loading branch information
edwintorok committed Oct 10, 2023
1 parent 1350311 commit efcf1f4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ocaml/tests/bench/lib/concurrent/ezbechamel_concurrent.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ module Worker = struct
signal t.stopped ; worker_loop ()
)
in
signal t.initialized;
Fun.protect ~finally worker_loop

let make ~allocate ~free ~run _ =
let start = semaphore () and stopped = semaphore () in
let t = {start; stopped; quit= Atomic.make false; result = Atomic.make None} in
let start = semaphore () and stopped = semaphore () and initialized = semaphore () in
let t = {start; stopped;initialized; quit= Atomic.make false; result = Atomic.make None} in
(t, Thread.create (worker ~allocate ~free ~run) t)

let signal_start (t, _) = signal t.start
Expand Down

0 comments on commit efcf1f4

Please sign in to comment.