mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 03:05:30 -05:00
fix fifo_pool: raise Shutdown, not Closed, in run
This commit is contained in:
parent
3f720241b2
commit
530507d84e
1 changed files with 2 additions and 1 deletions
|
|
@ -12,7 +12,8 @@ let[@inline] size_ (self : state) = Array.length self.threads
|
|||
let[@inline] num_tasks_ (self : state) : int = Bb_queue.size self.q
|
||||
|
||||
(** Run [task] as is, on the pool. *)
|
||||
let run_direct_ (self : state) (task : task) : unit = Bb_queue.push self.q task
|
||||
let run_direct_ (self : state) (task : task) : unit =
|
||||
try Bb_queue.push self.q task with Bb_queue.Closed -> raise Shutdown
|
||||
|
||||
let rec run_async_ (self : state) (task : task) : unit =
|
||||
let task' () =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue