mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-10 13:14:05 -05:00
add Task_local_storage.remove_in_local_hmap
This commit is contained in:
parent
7df8c069ed
commit
0545a39aff
1 changed files with 4 additions and 0 deletions
|
|
@ -31,6 +31,10 @@ let get_in_local_hmap_opt (k : 'a Hmap.key) : 'a option =
|
|||
let h = get_local_hmap () in
|
||||
Hmap.find k h
|
||||
|
||||
(** Remove given key from the local hmap *)
|
||||
let[@inline] remove_in_local_hmap (k : _ Hmap.key) : unit =
|
||||
update_local_hmap (Hmap.rem k)
|
||||
|
||||
let[@inline] set_in_local_hmap (k : 'a Hmap.key) (v : 'a) : unit =
|
||||
update_local_hmap (Hmap.add k v)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue