[ENH][VM][UNIX]generalized async IO

Lex Spoon lex at cc.gatech.edu
Sun Jan 28 10:20:45 UTC 2001


I've patched the Unix VM so that any part of the VM -- including plugins
-- may now register file descriptors to be checked with select()
whenever ioRelinquishProcessor() is called.  I also updated the
XWindows, sound, and sockets modules to use this general mechanism
instead of their own private one.

The immediate benefit is that sound events, too, will wake up
ioRelinquishProcessor().  A smaller benefit is that several hacks such
as soundPollFunction() and the extraFd argument to socketPollFunction()
are removed.

The longer-term benefit is that plugins don't need to modify the core VM
as often.  (To really do this right, there should also be a way to
register a general polling function.  I didn't get around to this,
because it turned out not to be necessary for anything in the core VM.)


The code for all this is at the bottom of:

	http://www.cc.gatech.edu/~lex/squeak/


It turned out to be pretty simple, since Ian already wrote the core
mechanism for sqUnixSocket.c.


Cheers,

-Lex





More information about the Squeak-dev mailing list