mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-05 19:00:33 -05:00
fix related to TLS
This commit is contained in:
parent
14fdee0593
commit
e3f11be0b3
1 changed files with 2 additions and 4 deletions
|
|
@ -57,10 +57,8 @@ let new_key (type t) ~init () : t key =
|
|||
|
||||
let[@inline] get_cur_ () : ls_value array ref =
|
||||
match get_current_storage () with
|
||||
| Some r ->
|
||||
assert (r != dummy);
|
||||
r
|
||||
| None -> failwith "Task local storage must be accessed from within a runner."
|
||||
| Some r when r != dummy -> r
|
||||
| _ -> failwith "Task local storage must be accessed from within a runner."
|
||||
|
||||
let[@inline] get (key : 'a key) : 'a =
|
||||
let cur = get_cur_ () in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue