1Ephemeron.K2.Make(3) OCaml library Ephemeron.K2.Make(3)
2
3
4
6 Ephemeron.K2.Make - Functor building an implementation of a weak hash
7 table
8
10 Module Ephemeron.K2.Make
11
13 Module Make
14 : functor (H1 : Hashtbl.HashedType) (H2 : Hashtbl.HashedType) -> sig
15 end
16
17
18 Functor building an implementation of a weak hash table
19
20
21 Parameters:
22
23 "H1"
24
25 Stdlib.Hashtbl.HashedType
26
27
28
29 "H2"
30
31 Stdlib.Hashtbl.HashedType
32
33
34
35
36
37
38
39
40
41 Propose the same interface as usual hash table. However since the bind‐
42 ings are weak, even if mem h k is true, a subsequent find h k may raise
43 Not_found because the garbage collector can run between the two.
44
45 Moreover, the table shouldn't be modified during a call to iter . Use
46 filter_map_inplace in this case.
47
48 include Hashtbl.S
49
50
51
52
53 val clean : 'a t -> unit
54
55 remove all dead bindings. Done automatically during automatic resizing.
56
57
58
59 val stats_alive : 'a t -> Hashtbl.statistics
60
61 same as Hashtbl.SeededS.stats but only count the alive bindings
62
63
64
65
66
67OCamldoc 2020-09-01 Ephemeron.K2.Make(3)