mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-05 19:00:33 -05:00
fix compilation on < 5.xx
This commit is contained in:
parent
7ed2e6991c
commit
0d7f348aa9
1 changed files with 4 additions and 0 deletions
|
|
@ -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 (
|
||||
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue