How to implement events on Unix?

Raab, Andreas Andreas.Raab at disney.com
Fri Feb 9 07:42:49 UTC 2001


Stefan,

[Seems like the mailing list server is several hours behind so I'm sending
this directly to you and have the list stay behind :-]

> >Since almost all VMs currently use a single thread for running both,
> >interpret() and the event processing loop, we have to be OUT OF 
> >INTERPRET() in order to receive an event.
> 
> So we should use two threads.  I thought, the event semaphore was 
> introduced for exactly that reason.

Yes it was. However, none of the current VMs use multi-threading for this
very purpose. And therefore signaling the input semaphore doesn't matter
(which was the whole point of the explanation).

> 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.

That is most definitely totally unrelated to events. Think about it - we use
semaphores that get signaled when the socket state changes. Signaling this
semaphore makes any waiting process active in a couple microseconds. So if
the VM in "sleep mode" is aware of possible state changes in the socket code
there is no relation to events whatsoever.

> Again, Java has the better features here and I really hate that!

Again?!

> I'd like to promote Squeak as an application server
> but this is impossible right now.

Well, from my point of view I'm just *way* more interested in personal
computing, media authoring and education. I don't think it's a bad sign that
Squeak doesn't qualify as application server ;-)

Cheers,
  - Andreas





More information about the Squeak-dev mailing list