package async_kernel
Monadic concurrency library
Install
Dune Dependency
Authors
Maintainers
Sources
async_kernel-v0.13.0.tar.gz
sha256=55a32c8b8e6aaaecb8357644515884367ec99b703fe8f984212b714a0e554c65
md5=d12b61a3f95325a511c50964bc9c819e
doc/async_kernel.weak_hashtbl_async/Weak_hashtbl_async/index.html
Module Weak_hashtbl_async
Like Weak_hashtbl
, but automatically collects keys with unused data, rather than requiring user code to call remove_keys_with_unused_data
.
include module type of Weak_hashtbl
val sexp_of_t :
('a -> Ppx_sexp_conv_lib.Sexp.t) ->
('b -> Ppx_sexp_conv_lib.Sexp.t) ->
('a, 'b) t ->
Ppx_sexp_conv_lib.Sexp.t
val create :
?growth_allowed:bool ->
?size:int ->
(module Core_kernel.Hashtbl.Key_plain with type t = 'a) ->
('a, 'b) t
growth_allowed
and size
are both optionally passed on to the underlying call to Hashtbl.create
.
module Using_hashable : sig ... end
val mem : ('a, _) t -> 'a -> bool
val find : ('a, 'b) t -> 'a -> 'b Core_kernel.Heap_block.t option
val find_or_add :
('a, 'b) t ->
'a ->
default:(unit -> 'b Core_kernel.Heap_block.t) ->
'b Core_kernel.Heap_block.t
val remove : ('a, 'b) t -> 'a -> unit
val add_exn : ('a, 'b) t -> key:'a -> data:'b Core_kernel.Heap_block.t -> unit
val replace : ('a, 'b) t -> key:'a -> data:'b Core_kernel.Heap_block.t -> unit
val key_is_using_space : ('a, _) t -> 'a -> bool
key_is_using_space t key
returns true
if key
is using some space in t
. mem t key
implies key_is_using_space t key
, but it is also possible that that key_is_using_space t key && not (mem t key)
.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>