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

Andreas Raab andreas.raab at gmx.de
Thu Jul 31 22:10:43 UTC 2003


Hi John,

The obvious answer to the problem of polling loops is to provide appropriate
notions within HandMorph rather than Sensor. If we are in Morphic, Sensor
doesn't play *any* role whatsoever, and if we provide the appropriate
behavior in HandMorph we can give it any extra notions we want. HandMorph is
part of Morphic so it is clear that any Morphic client should query the hand
instead of some low-level input device. Besides, this would allow you to
implement the queries correctly for multi-user environments.

Cheers,
  - Andreas

> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of John M McIntosh
> Sent: Thursday, July 31, 2003 10:56 PM
> To: The general-purpose Squeak developers list
> Subject: Re: [BUG][FIX] interrupt driven EventSensor ( could 
> somebody provide detailed review, please? )
> 
> 
> Well the major change in this patch is to pause the silly polling of  
> input devices that the SystemWindow does.
> 
> a) Fix SystemWindow
> 	fine but next fellow in will make same coding mistake.
> 
> b) If mouse information is only updated every 17ms or 10ms? does it  
> make sense to read them 10 times per ms?
> (hint as far as I can tell on the mac updates sensor data 
> about every  
> 17ms)
> Table PC (if any exist) do they update every 5ms, every ms?  
> do we care?
> 
> 
> So even if you propose a new solution I think you'll need 
> something to  
> prevent excessive spinning looking at
> the sensor data just so other background work can be 
> performed, either  
> within Squeak or other tasks on the machine.
> Certainly for VMs that support interrupt driven events, I 
> don't want to  
> spin cycles POLLING...
> 
> On Thursday, July 31, 2003, at 01:34  PM, Brent Vukmer wrote:
> 
> >
> >> Indeed. I'm hoping to foster discussion and suggestions for
> >> cleaner code right now.
> >>
> >
> > Hurray, Tim! (Or should I say "Huzzah" ?)
> >
> >
> >
> --
> ==============================================================
> ========== 
> ===
> John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
> Corporate Smalltalk Consulting Ltd.  
> http://www.smalltalkconsulting.com
> 
> ==============================================================
> ========== 
> ===
> 
> 



More information about the Squeak-dev mailing list