Skip to content

Commit

Permalink
Move error handling out of hot code.
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed Jul 22, 2024
1 parent 0b7020f commit 29502de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/picos_structured/bundle.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
open Picos

let[@inline never] completed () = invalid_arg "already completed"

type t = {
num_fibers : int Atomic.t;
bundle : unit Computation.t;
Expand Down Expand Up @@ -63,8 +65,6 @@ let join_after fn =
await t fiber packed canceler;
Exn_bt.raise exn_bt

let[@inline never] completed () = invalid_arg "already completed"

let rec incr t backoff =
let before = Atomic.get t.num_fibers in
if before = 0 then completed ()
Expand Down

0 comments on commit 29502de

Please sign in to comment.