How to implement events on Unix?

Lex Spoon lex at cc.gatech.edu
Fri Feb 9 16:30:47 UTC 2001


Stefan Matthias Aust <sma at 3plus4.de> wrote:


> I see.  Actually I think it's also important that sockets signal 
> events.  When using Swiki I noticed that there was a noticable difference 
> in the response time whether my mouse was inside the Squeak window or not.
> 

Interesting.  But do look at aioPollForIO in sqUnixSocket.c, which is
where the Unix VM waits when Squeak is idle.  The VM *should* be waking
up and signalling the image whenever relevant socket events happen. 
Perhaps listening sockets simply aren't having the right flag set in the
select() call?


Incidentally, a student here pointed out very similar behavior to what
you are seeing, for *sound* generation.  If Squeak is idle, then sound
events don't wake the VM from its stupor, and so sound output gets
stuttery.  Yet, if Squeak is running Morphic, response times get much
better and sound output is smooth.  (I've fixed this, by the way:
http://www.cc.gatech.edu/~lex/squeak/).  But unlike sound, Ian's VM
already handles waking up for socket events.  So to get back to the
punchline, perhaps the right flag isn't getting set in the select()
call??


-Lex





More information about the Squeak-dev mailing list