Re: external events api
Marcus Crestani <[email protected]> Mon, 25 Jul 2011 07:49:01 +0200
| Newsgroups | gmane.lisp.scheme.scheme48 |
|---|---|
| Message-ID | <[email protected]> |
>>>>>"RM" == Roderic Morris <[email protected]> writes: RM> It's not documented as far as I see, There is a section "External events" in the development version of the documentation that describes how to use external events, see doc/src/external.tex. RM> but looking at its usage in the address package (see c/net/address.c RM> and scheme/net/address.scm), it seems that we need to first create RM> an external event uuid with s48_external_event_uid(), call RM> wait-for-external-event on it, then use s48_note_external_event() in RM> whatever thread the event is completed on, and finally release the RM> uid when the original thread wakes up with RM> s48_unregister_external_event_uid(). That sounds correct. RM> If that's right, then I wonder if there are equivalents to those RM> s48_* c functions in some scheme package? It looks like it'd be more RM> straight forward to just create and unregister the uids in scheme. Right, since the uids have to be shared between Scheme and C anyway, they could also be created in Scheme and then exported to C. This functionality is currently only in the VM, though. -- Marcus