unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Wingo <wingo@igalia.com>
To: Mathieu Othacehe <m.othacehe@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>, Amirouche <amirouche@hypermove.net>
Subject: Re: (guix git) and guile-git finalizers.
Date: Tue, 13 Jun 2017 10:47:19 +0200	[thread overview]
Message-ID: <cucpoe846lk.fsf@igalia.com> (raw)
In-Reply-To: <86h8zliddr.fsf@gmail.com> (Mathieu Othacehe's message of "Mon, 12 Jun 2017 14:44:48 +0200")

On Mon 12 Jun 2017 14:44, Mathieu Othacehe <m.othacehe@gmail.com> writes:

> Maybe the right answer is to disable auto finalization and call
> run-finalizers as described here :
>
> https://www.gnu.org/software/guile/manual/html_node/Foreign-Object-Memory-Management.html#Foreign-Object-Memory-Management
>
> However I can't find guile counterparts for those libguile functions.

Nice sleuthing!

If you want to manually handle finalization at 'safe' points from
Scheme, guardians are the things to use.  Add your "finalizable" object
to a guardian, and periodically "pump" the guardian to see if anything
is finalizable; you can run the finalizer there.

Andy

  parent reply	other threads:[~2017-06-13  8:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12 12:44 (guix git) and guile-git finalizers Mathieu Othacehe
2017-06-13  8:15 ` Ludovic Courtès
2017-06-13 16:41   ` Mathieu Othacehe
2017-06-19 16:01   ` Mathieu Othacehe
2017-06-22 11:40     ` Andy Wingo
2017-07-01 10:16       ` Mathieu Othacehe
2017-07-01 12:50         ` Ludovic Courtès
2017-07-01 14:33           ` Mathieu Othacehe
2017-06-13  8:47 ` Andy Wingo [this message]
2017-06-13 16:39   ` Mathieu Othacehe

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cucpoe846lk.fsf@igalia.com \
    --to=wingo@igalia.com \
    --cc=amirouche@hypermove.net \
    --cc=guix-devel@gnu.org \
    --cc=m.othacehe@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).