[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: allocation within critical sections
From: |
Andy Wingo |
Subject: |
Re: allocation within critical sections |
Date: |
Sun, 19 Feb 2012 10:42:49 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) |
On Fri 17 Feb 2012 23:59, address@hidden (Ludovic Courtès) writes:
> Andy Wingo <address@hidden> skribis:
>
>> Ooooh, good one. A bug in Guile, this one, and tricky to get around.
>> Of course, running finalizers in a separate thread will solve it.
>
> It’s about [deferring] user-provided finalizer execution, no?
I think that's a limiting way to look at the problem -- it's really
about running finalizers within a context in which no other locks are
held. See the "Destructors, Finalizers, and Synchronization" paper from
Boehm.
> What about using asyncs for that? For instance, scm_i_finalize_smob
> make a [deferred], instead of direct, call to the SMOB’s ‘free’, via
> scm_i_queue_async_cell.
It's an interesting idea. I suspect that it only defers the problem,
though: if we start running finalizers through asyncs, we'll run into
problems with locks at the scheme level.
That is to say, just because you are in Scheme does not mean you can
acquire any lock without deadlock.
Andy
--
http://wingolog.org/
- allocation within critical sections, Andy Wingo, 2012/02/09
- Re: allocation within critical sections, Andy Wingo, 2012/02/13
- Re: allocation within critical sections, Ludovic Courtès, 2012/02/16
- Re: allocation within critical sections, Andy Wingo, 2012/02/16
- Re: allocation within critical sections, Mike Gran, 2012/02/16
- Re: allocation within critical sections, Andy Wingo, 2012/02/17
- Re: allocation within critical sections, Mike Gran, 2012/02/17
- Re: allocation within critical sections, Andy Wingo, 2012/02/17
- Re: allocation within critical sections, Ludovic Courtès, 2012/02/17
- Re: allocation within critical sections,
Andy Wingo <=
- Re: allocation within critical sections, Ludovic Courtès, 2012/02/19
- Re: allocation within critical sections, Andy Wingo, 2012/02/19
- Re: allocation within critical sections, Andy Wingo, 2012/02/24