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

18 lines
425 B
OCaml

type 'a t
(** An ['a t] is a weak pointer to an ['a]. *)
val empty : unit -> 'a t
(** [empty ()] is a fresh empty pointer. *)
val wrap : 'a -> 'a t
(** [wrap x] is a weak pointer to [x]. *)
val get : 'a t -> 'a option
(** [get t] is the target of [t], or [None] if it has been GC'd. *)
val set : 'a t -> 'a -> unit
(** [set t x] puts [x] in the pointer. *)
val clear : 'a t -> unit
(** [clear t] empties the pointer. *)