[BUG][FIX] interrupt driven EventSensor ( could somebody provide detailed review, please? )

Andreas Raab andreas.raab at gmx.de
Fri Aug 1 19:56:12 UTC 2003


> Finally, it is disturbing that it would be *wrong* for the Unix VM to
> signal that an event has arrived, at the time that it notices that an
> event has arrived. 

I did not say it is "wrong" - I said it is "pointless". The difference is
important. It is not considered "wrong" that the VM signals the input
semaphore whenever something happens, as it may be that some implementation
cannot distinguish between "in-thread" and "out-of-thread" events (e.g., if
you have one interface to put in events you may as well signal the semaphore
if you aren't sure that this is called exclusively from the main thread). So
it's okay that the VM singals the semaphore whenever something happens - it
merely means a bit of (often affordable) extra work. Whether small, slow
machines really want to incur the overhead is a different matter altogether.

> Should the VM really have to be careful about whether
> a get-event primitive is currently executing when it 
> notices the event coming in?  It seems much simpler to
> put in the initSignals and to give the VM some slack. 
> VM code is much harder than Smalltalk code.

Right. See above.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list