Files
Thomas Leonard 5def4159ff Remove lwt from directory names
Makes it match the new package names, and also will shrink the diff for
the Eio port.
2024-11-07 13:16:31 +00:00

19 lines
207 B
OCaml

type 'a t = 'a Weak.t
let empty () =
Weak.create 1
let set t x =
Weak.set t 0 (Some x)
let clear t =
Weak.set t 0 None
let wrap x =
let t = empty () in
set t x;
t
let get t =
Weak.get t 0