Re: Changeset 0306c5a64775
Michael Sperber <[email protected]> Tue, 12 Jun 2012 20:32:57 +0200
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
Robert Ransom <[email protected]> writes: > See attached for a patch that fixes one clear bug in the > external-events package. That doesn't fix the problem with > wait-for-child-process. > > In order to fix the general problem of incorrect deadlock detection, I > think we need: > > 1. a way to mark thread queues as ‘blocking on an external event’ for > deadlock-detection purposes > 2. a way to mark condvars and placeholders as ‘blocking on an external > event’ (getaddrinfo and wait-for-child-process should be using > placeholders; the posix-signals package should be using condvars) > 3. support for registering long-term handlers to handle every > occurrence of an external event UID > 4. an as-general-as-possible ‘external asynchronous result’ system to > handle placeholders which should be filled in from C So I finally fixed (I hope) these issues - it took a whole bunch of changes, along the lines of what Robert suggested: - Threads can, when blocking on an external event or something similar, explicitly say that the blocking does not contribute to deadlock. - `wait-for-child-process' can now use a very simple implementation using placeholders. - The race with external-event uids is fixed by allocating the uids in Scheme rather than in C. It should now be possible to build a higher-level abstraction for this with placeholders, but I haven't done that yet. While the tests all succeed, and I've mulled over the changes quite a while, are quite sensitive: Review and further testing much appreciated! (Especially as this issue was the only one blocking the release.) Thanks to Robert and Roderic for analyzing the problems and for the patches - extremely helpful! -- Cheers =8-} Mike Friede, Völkerverständigung und überhaupt blabla