[ENH] Alternative EventSensor

Lex Spoon lex at cc.gatech.edu
Mon Jul 31 12:41:36 UTC 2000


"Raab, Andreas" <Andreas.Raab at disney.com> wrote:
> Events itself are read in by a process running at #lowIOPriority. This
> process waits either waits for a specified amount of milliseconds between
> looking for more events or can be triggered by an event semaphore. You may
> ask why I'm using two mechanisms here but the answer is simple. Most VMs
> will not support true asynchronous notifications about events so we do have
> to poll at some point. If, however, the VM does support async event
> notification, the semaphore can be used to signal incoming events. The
> design of the EventSensor allows for both mechanisms.
> 

Alternatively, this could be solved the same way it is for sockets.  On
platforms where it can't be done asynchronously, do it from
HandleEvents().  Image code will have the impression that the events are
asynchronous, it's just that they will be delayed by a few milliseconds.


-Lex





More information about the Squeak-dev mailing list