Interpreter change

Andreas Raab andreas.raab at gmx.de
Mon Apr 17 21:46:44 UTC 2006


Hi John -

> I do think here if you want a specialized call to process socket events 
> what about a flag aioPollNeeded and set that to true, then check for 
> that in checkForInterrupts()
> Otherwise  you end up with ioProcessEvents() being called say oh 10,000 
> a second if there are lots of socket events happening? and just because 
> ioProcessEvents() handles
> sockets doesn't mean it might be doing other things which are assuming a 
> low calling rate.

Yes, this could be done but the "minimally invasive" solution of 
resetting nextPollTick seems pretty good in my understanding. Mostly 
because a) a platform doesn't have to force an interrupt check if it 
can't handle 10k queries a second and b) if it's really that slow in a 
part of ioProcessEvents it could use a timer or somesuch to not overdo 
the polling.

If we would change that, we probably should factor this so that we have 
a call to ioProcessInterrupts() being called from checkForInterrupts() 
(instead of ioProcessEvents) so that the platform code can decide what 
is proper to do in an interrupt check vs. what is proper to do in a 
"full" event query. In practice, I'd expect the two to be the same however.

Having said that, let me add that all *I* care about right now, is VMs 
that pass the Croquet VM tests ;-) The first solution has already been 
proven to do that so I have a clear preference for having that solution 
*right now* simply because I've already seen it working.

Cheers,
   - Andreas



More information about the Vm-dev mailing list