Skip to content

Commit

Permalink
fix compilation on < 5.xx
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Apr 23, 2024
1 parent 7ed2e69 commit 0d7f348
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/coop_lock.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ let try_lock_ (self : 'a t) : 'a option =
else
None

[@@@ifge 5.0]

let rec lock_ (self : 'a t) : 'a =
let old = A.get self.st in
if old.locked then (
Expand Down Expand Up @@ -104,3 +106,5 @@ let with_try_lock self f =
let bt = Printexc.get_raw_backtrace () in
unlock_ self x;
Printexc.raise_with_backtrace e bt)

[@@@endif]

0 comments on commit 0d7f348

Please sign in to comment.