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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 251F880161 for ; Mon, 19 Jun 2017 08:03:00 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=francois.bobot@cea.fr; spf=Pass smtp.mailfrom=francois.bobot@cea.fr; spf=None smtp.helo=postmaster@oxalide-smtp-out.extra.cea.fr Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of francois.bobot@cea.fr) identity=pra; client-ip=132.168.224.13; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="francois.bobot@cea.fr"; x-sender="francois.bobot@cea.fr"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of francois.bobot@cea.fr designates 132.168.224.13 as permitted sender) identity=mailfrom; client-ip=132.168.224.13; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="francois.bobot@cea.fr"; x-sender="francois.bobot@cea.fr"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@oxalide-smtp-out.extra.cea.fr) identity=helo; client-ip=132.168.224.13; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="francois.bobot@cea.fr"; x-sender="postmaster@oxalide-smtp-out.extra.cea.fr"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3At5GzbxzvatMNaE7XCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?1O8TIJqq85mqBkHD//Il1AaPBtSEraocw8Pt8InYEVQa5piAtH1QOLdtbDQizf?= =?us-ascii?q?ssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1?= =?us-ascii?q?JuPoEYLOksi7ze6/9pnRbglSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeu?= =?us-ascii?q?BWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbO?= =?us-ascii?q?SxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRH1li?= =?us-ascii?q?kHOT43/mLZhMN+g61Uog6uqRNkzo7IY4yYLuZycr/TcN4YQ2dKQ8ZfVzZGAoO5?= =?us-ascii?q?d4YBD/ABMvxer47loFsOrAC+ChGxCePo0TBIgWP21rA93uQvCwHJxgogEM4JsH?= =?us-ascii?q?TVt9X5LrwdUeeuw6nP0TXOdO9Z1inn54TSfBAhu+iBULRtesTS0UkiDx7Jg1uO?= =?us-ascii?q?pYD/Ij+Y1+cAv3KF4+Z+Wu+jkXMrpg9prjSyyMoglJPFip8Ux13F7yl0w4c4Kc?= =?us-ascii?q?elREJnZ9OvDYFeuDuAN4RsR8MvW2Fotzg+yr0BoZO7eycLx44jxx7edvOIbZGE?= =?us-ascii?q?4gnmVOaNOTd0nXVleK+jhxqo70ehxfH8VtOu31pQsiVKjMPDumoD1xzJ8sSHS/?= =?us-ascii?q?198Vm92TuXygze5P9ILVopmafaKJMt2KA8moQcvEjZAyP7ll36jKqMeUUl/uio?= =?us-ascii?q?5f7nYrLjppKEOY90kBvxMqIylcy4AOQ4KRICUHOc+eun073j4Vb0T6lUgfIsiK?= =?us-ascii?q?XZvoraKdwBpqGlGw9Vzpoj6xGnAji6ytsYmH0HIEtBeBKGlIjpJ0rDIOv4DPe6?= =?us-ascii?q?m1Sjii1nx/HAPr37A5XCNGLPkLn7feU110kJwwM2yZVb5olIIrAHOvP6HEHr5/?= =?us-ascii?q?LCCRpsHRa9xWngCc5K/IQUXn7HVqGDOaXZtl6ToOgoKe6QTIQYsXDzMa52tLbV?= =?us-ascii?q?kXYllApFLuGS1pwNZSXgEw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DzAACBaEdZhw3gqIRdHQYMiTOLDJEGm?= =?us-ascii?q?AiGJAKCakMUAQEBAQEBAQEBAQESAQEBCgsJCCgvgjMigkQBAgIBIw8BBVELGgI?= =?us-ascii?q?mAgJXEwgBAYogCK1lgiaLYDKBC4djgWuBDIU1gkaCYQWeXnOeBoZzlQk2YEtRJ?= =?us-ascii?q?1qFHYF0ilUBAQE?= X-IPAS-Result: =?us-ascii?q?A0DzAACBaEdZhw3gqIRdHQYMiTOLDJEGmAiGJAKCakMUAQE?= =?us-ascii?q?BAQEBAQEBAQESAQEBCgsJCCgvgjMigkQBAgIBIw8BBVELGgImAgJXEwgBAYogC?= =?us-ascii?q?K1lgiaLYDKBC4djgWuBDIU1gkaCYQWeXnOeBoZzlQk2YEtRJ1qFHYF0ilUBAQE?= X-IronPort-AV: E=Sophos;i="5.39,359,1493676000"; d="scan'208";a="279528781" Received: from oxalide-smtp-out.extra.cea.fr ([132.168.224.13]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jun 2017 08:02:59 +0200 Received: from pisaure.intra.cea.fr (pisaure.intra.cea.fr [132.166.88.21]) by oxalide-sys.extra.cea.fr (8.14.7/8.14.7/CEAnet-Internet-out-4.0) with ESMTP id v5J62wCu143758 for ; Mon, 19 Jun 2017 08:02:59 +0200 Received: from pisaure.intra.cea.fr (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id B38AE206AE7 for ; Mon, 19 Jun 2017 08:02:58 +0200 (CEST) Received: from muguet2.intra.cea.fr (muguet2.intra.cea.fr [132.166.192.7]) by pisaure.intra.cea.fr (Postfix) with ESMTP id 89752206AC0 for ; Mon, 19 Jun 2017 08:02:58 +0200 (CEST) Received: from [132.166.86.10] ([132.166.86.10]) by muguet2.intra.cea.fr (8.15.2/8.15.2/CEAnet-Intranet-out-1.4) with ESMTP id v5J62u7p024383 for ; Mon, 19 Jun 2017 08:02:57 +0200 To: caml-list@inria.fr References: From: =?UTF-8?Q?Fran=c3=a7ois_Bobot?= Message-ID: Date: Mon, 19 Jun 2017 08:02:55 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] One more question about Gc.finalise 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. > > My experimentation _seems_ to suggest that I do, but there is always the danger that I am > misinterpreting the results of my experiment. :-) With newer ocaml version (>= 4.04), you can use `GC.finalise_last` which can't use the value finalised (unit instead of 'a is given to the function `f`) but the function `f` will really be called after `v` is unreachable for the last time, just before being reclaimed. Perhaps it could fit better what you have in mind. Best, -- François