man-pages/man3/Ephemeron.Kn.Make.3o.html
2021-03-31 01:06:50 +01:00

116 lines
1.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of Ephemeron.Kn.Make</TITLE>
</HEAD><BODY>
<H1>Ephemeron.Kn.Make</H1>
Section: OCaml library (3o)<BR>Updated: 2020-01-30<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
Ephemeron.Kn.Make - Functor building an implementation of a weak hash table
<A NAME="lbAC">&nbsp;</A>
<H2>Module</H2>
Module Ephemeron.Kn.Make
<A NAME="lbAD">&nbsp;</A>
<H2>Documentation</H2>
<P>
Module
<B>Make</B>
<BR>&nbsp;:&nbsp;
<B>functor (H : Hashtbl.HashedType) -&gt; sig end</B>
<P>
<P>
Functor building an implementation of a weak hash table
<P>
<P>
<B>Parameters:</B>
<P>
&quot;H&quot;
<P>
<B>Stdlib.Hashtbl.HashedType</B>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
<P>
Propose the same interface as usual hash table. However since
the bindings are weak, even if
<B>mem h k</B>
is true, a subsequent
<B>find h k</B>
may raise
<B>Not_found</B>
because the garbage collector
can run between the two.
<P>
Moreover, the table shouldn't be modified during a call to
<B>iter</B>
.
Use
<B>filter_map_inplace</B>
in this case.
<P>
<I>include Hashtbl.S</I>
<P>
<P>
<P>
<P>
<I>val clean </I>
:
<B>'a t -&gt; unit</B>
<P>
remove all dead bindings. Done automatically during automatic resizing.
<P>
<P>
<P>
<I>val stats_alive </I>
:
<B>'a t -&gt; Hashtbl.statistics</B>
<P>
same as
<B>Hashtbl.SeededS.stats</B>
but only count the alive bindings
<P>
<P>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">Module</A><DD>
<DT id="3"><A HREF="#lbAD">Documentation</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:39 GMT, March 31, 2021
</BODY>
</HTML>