mirror of
https://github.com/zap-proto/ocaml-rpc.git
synced 2026-10-30 15:04:28 +00:00
Makes it match the new package names, and also will shrink the diff for the Eio port.
19 lines
207 B
OCaml
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
|