> 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 mutexes. > 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. _______________________________________________ Guile-devel mailing list [email protected] http://lists.gnu.org/mailman/listinfo/guile-devel
