Module Resource.Make_simple
Wrap a resource that does not natively support a has_close_started
operation in a simple record to add such tracking.
Parameters
Signature
include Resource_cache__.Resource_intf.S
module Key : sig ... end
module Common_args : Core_kernel.T
val open_ : Key.t -> Common_args.t -> t Async_kernel.Deferred.Or_error.t
val close : t -> unit Async_kernel.Deferred.t
val close_finished : t -> unit Async_kernel.Deferred.t
val has_close_started : t -> bool
has_close_started t
should returntrue
iffclose t
has been called, even ifclose_finished
has not been determined.
type resource
= R.t