caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques-Henri Jourdan <jacques-henri.jourdan@normalesup.org>
To: caml-list@inria.fr
Subject: Re: [Caml-list] One more question about Gc.finalise
Date: Mon, 19 Jun 2017 14:04:20 +0200	[thread overview]
Message-ID: <12ad0465-1da0-bf27-628e-ec5fef9342a4@normalesup.org> (raw)
In-Reply-To: <d5f7ab54-4cd6-d655-7cf8-aaddcc8d016e@cea.fr>

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]



On 06/19/2017 08:02 AM, François Bobot wrote:
> Hi,
>
> Le 19/06/2017 à 01:45, Evgeny Roubinchtein a écrit :
>> I have one more question about Gc.finalise to which I couldn't find 
>> an answer in the documentation.
>> Suppose I do, "Gc.finalise f v", and the function f makes the value v 
>> reachable again.  If I want f
>> to be called again should v become unreachable again, do I need to 
>> again call "Gc.finalise f v",
>> after f has "revived" v?
>
>
> I think so, but I didn't double checked with the code. 

Indeed it is. This is even used to implement alarm in stdlib :

https://github.com/ocaml/ocaml/blob/trunk/stdlib/gc.ml#L103

-- 
JH

[-- Attachment #2: Type: text/html, Size: 1363 bytes --]

      reply	other threads:[~2017-06-19 12:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-18 23:45 Evgeny Roubinchtein
2017-06-19  6:02 ` François Bobot
2017-06-19 12:04   ` Jacques-Henri Jourdan [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=12ad0465-1da0-bf27-628e-ec5fef9342a4@normalesup.org \
    --to=jacques-henri.jourdan@normalesup.org \
    --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;
as well as URLs for NNTP newsgroup(s).