From: "Björn Pelzer" <bpelzer@uni-koblenz.de>
To: Damien Doligez <damien.doligez@inria.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Understanding GC and Alarms
Date: Wed, 05 Aug 2009 17:04:41 +0200 [thread overview]
Message-ID: <4A799F89.6010001@uni-koblenz.de> (raw)
In-Reply-To: <1A0EB2E6-C9D8-478D-A266-806C5F74CA90@inria.fr>
Hello Damien!
Damien Doligez wrote:
> Yes, the GC calls the finalisation functions in order, so it waits for your
> finalisation function to finish before starting the next one. If your
> function doesn't terminate...
>
Ok, makes sense.
>> Is there a way to get the GC back to normal after an exception during
>> the alarm?
>
> That is the purpose of the Gc.finalise_release function: tell the GC to
> behave
> as if the current finalisation function had finished. Note that
> finalise_release
> is also safe to call from outside a finalisation function, so you can
> call it
> from your exception handler.
Thank you very much! Very helpful, works as you say.
In hindsight I should have figured this out from the manual, but, well,
I didn't. :-)
> When bug 4742 is fixed (probably in 3.12.0), you won't need it any more.
> Note that I wanted to fix it by ignoring the exception entirely, but
> your use case made me change my mind.
Sounds good, keeping the exception handling would be useful, at least
for me. Using the release-function as you explained is not much of a
bother, in particular now that I get how it works, so there is no
pressing need for a change/bugfix from my side.
Thanks again and best regards,
Björn
--
Björn Pelzer
AGKI - Artificial Intelligence Research Group
University Koblenz-Landau, B 225
http://www.uni-koblenz.de/~bpelzer
Tel.(office): (+49) 261 287 2776
Tel.(home): (+49) 261 942 3908
prev parent reply other threads:[~2009-08-05 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-04 13:39 Björn Pelzer
2009-08-05 14:33 ` [Caml-list] " Damien Doligez
2009-08-05 15:04 ` Björn Pelzer [this message]
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=4A799F89.6010001@uni-koblenz.de \
--to=bpelzer@uni-koblenz.de \
--cc=caml-list@yquem.inria.fr \
--cc=damien.doligez@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