module Raw : sig ... endval create : acquire:(unit ‑> ('a, 'e) Core.Result.t Async_kernel.Deferred.t) ‑> release:('a ‑> unit Async_kernel.Deferred.t) ‑> ('a, 'e) tval with_ : ('a, 'e) t ‑> f:('a ‑> 'b Async_kernel.Deferred.t) ‑> ('b, 'e) Core.Result.t Async_kernel.Deferred.tAccess a resource without having to deal with Handle.t explicitly.
The resource is acquired before f is called and released after f returns a result
or raises an error to the enclosing monitor.
f should not use 'a after it raises or returns, whichever happens first.
Bind corresponds to resource dependency:
when acquiring x >>= f, resource x will be acquired, then f is going to
be evaluated, then the result of f is going to be acquired.
Releases will be done in the opposite order.
include Core.Monad.S2 with type (a, e) t := (a, e) tinclude Base__.Monad_intf.Syntax2 with type (a, e) t := (a, e) tmodule Let_syntax : sig ... endmodule Monad_infix : Base__.Monad_intf.Infix2 with type (a, e) t := (a, e) tval return : 'a ‑> ('a, _) tval fail : 'e ‑> ('a, 'e) tmodule Memo : functor (Key : Core.Hashable) -> sig ... endval delayed_release : ('a, 'e) t ‑> delay:Core.Time.Span.t ‑> ('a, 'e) tDelay all releases by the given amount and don't wait for them