[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thread cancellation, take 2

From: Julian Graham
Subject: Re: thread cancellation, take 2
Date: Thu, 20 Sep 2007 11:36:33 -0400

> Would it be possible to defer execution of the Scheme code (cleanup
> handlers) to after the C cleanup handler has been called?
> I.e., the C handler would push the Scheme handlers to a list that would
> be eventually executed, when Guile is back into a "clean", regular
> state.

Yeah, that would be fine -- except that after the thread is signaled
for cancellation, it'll never go back into a regular state.  That is,
I think the next thing that happens is that the thread-local exit
handlers (on_thread_exit in threads.c) get called -- and I don't think
that code evaluates queued asyncs (please let me know if it actually
does!).  And any queued asyncs would have to be evaluated within that
thread (and in order), because people are going to want to do things
that have to be done from within a particular thread, like unlock

> I'd prefer thunks as well, it looks more Schemey.

I agree -- and makes things way easier if it turns out it's possible
to do this with asyncs.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]