I wrote: > System asyncs can run while mutexes are locked. Asyncs can run > arbitrary scheme code, so of course mutexes will often be locked within > asyncs as well. So what happens if an async tries to lock a mutex that > has already been locked by the same thread? Deadlock, of course.
I've mulled this over, and I think the solution will involve finding all of the mutexes that are likely to be locked within asyncs without the user's knowledge (i.e. essentially all mutexes used in core Guile, both in C and in Scheme), and ensuring that asyncs are disabled before any of those mutexes are locked. What do you think? Mark