From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id DE47780161 for ; Mon, 19 Jun 2017 14:04:22 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jacques-henri.jourdan@normalesup.org; spf=Neutral smtp.mailfrom=jacques-henri.jourdan@normalesup.org; spf=None smtp.helo=postmaster@ulminfo.fr Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jacques-henri.jourdan@normalesup.org) identity=pra; client-ip=5.135.188.139; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jacques-henri.jourdan@normalesup.org"; x-sender="jacques-henri.jourdan@normalesup.org"; x-conformance=sidf_compatible Received-SPF: Neutral (mail3-smtp-sop.national.inria.fr: domain of jacques-henri.jourdan@normalesup.org does not assert whether or not 5.135.188.139 is permitted sender) identity=mailfrom; client-ip=5.135.188.139; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jacques-henri.jourdan@normalesup.org"; x-sender="jacques-henri.jourdan@normalesup.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@ulminfo.fr) identity=helo; client-ip=5.135.188.139; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jacques-henri.jourdan@normalesup.org"; x-sender="postmaster@ulminfo.fr"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AlBMSNx2VrMA6J9OusmDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?seISL/ad9pjvdHbS+e9qxAeQG96KtLQc06L/iOPJYSQ4+5GPsXQPItRndiQuro?= =?us-ascii?q?EopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZv?= =?us-ascii?q?JuTyB4Xek9m72/q89pDXYQhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+?= =?us-ascii?q?VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfM?= =?us-ascii?q?QA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLmlT?= =?us-ascii?q?kJNzA5/m/UhMJ/gq1UrxC9qBFk2YHYfJuYOeBicq7Tf94XQ3dKUMZLVyxGB4Ox?= =?us-ascii?q?d48BAPAdMuZBsonyuUAOoQK8CwayAuPv0D5IjWLy0609zuQhCxzJ0xYmH9kTt3?= =?us-ascii?q?nUrs/6O7sLUeCo0qbI1izPb/NI1jf78ojIcwotofOLXbJta8re1FMgFwXeg1WW?= =?us-ascii?q?rozlJTaV2f4Js2eF9OpgSPqvh3QgqwFrrTii38EhgZTHiIISz1DL7yR5wIAtKN?= =?us-ascii?q?23SU57fd6kEIZLuC2AK4R2RcYiTmd1syg50r0LoZ62cDIXxJkpxxPTceGLfouL?= =?us-ascii?q?7x75SeqcLzN1iGp4dL+xgxu+61Wsx+nmWsWp0VtHrTBJn9fIu30Lyhfd8NKISu?= =?us-ascii?q?Fn8UekwTuP1x7c6uVDIU0siKrbL5shwr82lpodtkTPBCH2mF/ugK+XcEUr5PSo?= =?us-ascii?q?5vznb7n8u5OROY95hhvjPqktmcGzG/k0PwYKUmSD/OSzzrzj/Un3QLVQif02l7?= =?us-ascii?q?HUsJLAKssHv665HhFa0p065xa/ETim1s4YnXgdIFJHfxKHkpLpNEzUL/D+Fvq/?= =?us-ascii?q?hVOskC1ux//cOr3uHI7NLmXbkLv7erZ98UFcxBIpzd9D/5JUFq0BIPXrV0Dtrt?= =?us-ascii?q?PYCxs5PxWww+bmE9V9ypgTWXmPA6+cKKPdq0WE5uMpI+mWZY8aoizxK/Y/562m?= =?us-ascii?q?sXhsklYYeeyt3IALQHG+BPVvZUuDMlT2hdJUM24BpxczV6nKhVuYUHZxYGuoU6?= =?us-ascii?q?s6rmU5AYm/EIrYA4CghqaAmiW8A4dab2ZuDFeWFH7sep6ZQ7ELci3EcZwpqSAN?= =?us-ascii?q?SbX0E9xp7hqprgKvk7c=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0C7CAAcvUdZZIu8hwVcHQEFAQsBg1hig?= =?us-ascii?q?Q2Da5wTmAgshXgCCIJDQhUBAQEBAQEBAQEBAQOBD4IzIoJEAQUjZgsEARMqAgJ?= =?us-ascii?q?XEwgCiigEDK16giYqizcBCyEFiG6Cd4U1gkaCYQWeXocwl0mGc5UJNSFASzAhM?= =?us-ascii?q?FGHEXSJYQEBAQ?= X-IPAS-Result: =?us-ascii?q?A0C7CAAcvUdZZIu8hwVcHQEFAQsBg1higQ2Da5wTmAgshXg?= =?us-ascii?q?CCIJDQhUBAQEBAQEBAQEBAQOBD4IzIoJEAQUjZgsEARMqAgJXEwgCiigEDK16g?= =?us-ascii?q?iYqizcBCyEFiG6Cd4U1gkaCYQWeXocwl0mGc5UJNSFASzAhMFGHEXSJYQEBAQ?= X-IronPort-AV: E=Sophos;i="5.39,361,1493676000"; d="scan'208,217";a="228875650" Received: from ulminfo.fr ([5.135.188.139]) by mail3-smtp-sop.national.inria.fr with ESMTP; 19 Jun 2017 14:04:22 +0200 Received: from [139.19.168.39] (wks-50-28.mpi-sws.org [139.19.168.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ulminfo.fr (Postfix) with ESMTPSA id B1C6DC09EF for ; Mon, 19 Jun 2017 14:04:20 +0200 (CEST) To: caml-list@inria.fr References: From: Jacques-Henri Jourdan Message-ID: <12ad0465-1da0-bf27-628e-ec5fef9342a4@normalesup.org> Date: Mon, 19 Jun 2017 14:04:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------4E4A4744DCE4AAAB8EB36E6D" Subject: Re: [Caml-list] One more question about Gc.finalise This is a multi-part message in MIME format. --------------4E4A4744DCE4AAAB8EB36E6D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------4E4A4744DCE4AAAB8EB36E6D Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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
--------------4E4A4744DCE4AAAB8EB36E6D--