From: "François Bobot" <francois.bobot@cea.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Marshalling: automatic discard of unmashalable data via ephemerons
Date: Wed, 16 Oct 2013 17:30:02 +0200 [thread overview]
Message-ID: <525EB0FA.7080302@cea.fr> (raw)
In-Reply-To: <20131016144229.GC17954@birba.invalid>
On 16/10/2013 16:42, Enrico Tassi wrote:
> On Wed, Oct 16, 2013 at 04:03:18PM +0200, Jacques-Henri Jourdan wrote:
>> The authors of Why3 encountered similar problems. I suggest you to read
>> the Weakhtbl module, that gives a solution to this problem.
>
> Thanks for the hint!
>
> Indeed they use an imperative list to enqueue/dequeue deletions
> that are hence never performed by the finalizer itself.
>
Another important points is that it allows concurrent access. The
finalizer can run when the actual deletions is performed (add can run
when iter_remove is run)
module ProdConsume :
sig
type 'a t
val create : unit -> 'a t
val add : 'a -> 'a t -> unit
val iter_remove : ('a -> unit) -> 'a t -> unit
end
--
François
next prev parent reply other threads:[~2013-10-16 15:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 15:30 Enrico Tassi
2013-10-16 14:03 ` Jacques-Henri Jourdan
2013-10-16 14:42 ` Enrico Tassi
2013-10-16 15:30 ` François Bobot [this message]
2013-10-16 16:24 ` Alain Frisch
2013-10-22 9:38 ` [Caml-list] Marshalling: automatic discard of unmashalable data via oleg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=525EB0FA.7080302@cea.fr \
--to=francois.bobot@cea.fr \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox