Re: external events api
Marcus Crestani <[email protected]> Wed, 03 Aug 2011 19:59:22 +0200
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
>>>>>"RM" == Roderic Morris <[email protected]> writes: RM> It seems that this api has trouble with notes happening in quick RM> succession. Yes, it is not guaranteed that every `s48_note_external_event' gets handled immediately. That's why external code has to collect multiple external events and provide a mechanism for Scheme to obtain *all* occurred events that have not yet been obtained before. I took a quick look at your patch and I think you should try the following: - In `process-terminated-children' you have to collect all terminated children, e.g. put them in a list. - In `really-wait-for-child-process' you have to obtain that list of terminated children after `wait-for-external-event' returns. Then, process every terminated child by unblocking previously called `wait-for-child-process', for example via the placeholder in process-id. This way you should not lose any terminated child. -- Marcus