fix related to TLS

This commit is contained in:
Simon Cruanes 2024-08-27 10:15:40 -04:00
parent 14fdee0593
commit e3f11be0b3
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -57,10 +57,8 @@ let new_key (type t) ~init () : t key =
let[@inline] get_cur_ () : ls_value array ref = let[@inline] get_cur_ () : ls_value array ref =
match get_current_storage () with match get_current_storage () with
| Some r -> | Some r when r != dummy -> r
assert (r != dummy); | _ -> failwith "Task local storage must be accessed from within a runner."
r
| None -> failwith "Task local storage must be accessed from within a runner."
let[@inline] get (key : 'a key) : 'a = let[@inline] get (key : 'a key) : 'a =
let cur = get_cur_ () in let cur = get_cur_ () in