Module Async_kernel__.Deferred_memo
module Deferred = Async_kernel__.Deferred1val general : (module Core_kernel.Hashable.S_plain with type t = 'a) -> ('a -> 'b Deferred.t) -> ('a -> 'b Deferred.t) Core_kernel.Staged.tgeneral hashable freturns a memoized version off, where the results are stored in a hash table indexed according tohashable. Iff aasynchronously raises, then the error is stored in the hash table and is reraised whenais demanded.Unlike
Core_kernel.Memo.general, thisgeneraldoes not supportcache_size_bounddue to complexities of asynchrony -- even when one has a deferred return by the memoized function, there still may be asynchronous jobs working to determine it.Unlike
Core_kernel.Memo.general, thisgeneraltakes a requiredHashablemodule argument, to avoid unintentional use of polymorphic comparison.
val unit : (unit -> 'a Deferred.t) -> (unit -> 'a Deferred.t) Core_kernel.Staged.t