mac VM 3.2.5b7

Marcel Weiher marcel at metaobject.com
Wed Mar 6 23:09:27 UTC 2002


On Wednesday, March 6, 2002, at 10:40 PM, John M McIntosh wrote:

> I've not sure what you mean by making it passive?

Making the outside world call Squeak, instead of the other way around, 
with Squeak returning once it is done processing the current event.   
(Yes, there is the issue of background Squeak threads, but there is a 
solution:  when returning, Squeak should indicate how soon it would like 
to be run again).

> Right now the main thread blocks on RunApplicationEventLoop.
> The pthreaded inter.c spins, and perhaps does a usleep() (which is a 
> pthread delay).

I thought it was a Mach thread_switch() with the option wait.

> Although there *is* an event sensor semaphore I'm not aware any VM 
> actually signals it...

CocoaSqueak does.  It has implemented the two-thread, event-driven model 
for well over a year now.  However, it would be even nicer if you didn't 
need two threads to live in an event driven environment.

> (OK I think I'll try it just for interest sake)

Works OK, AFAICT.

[references to complex Carbon stuff deleted]

Looks like the sort of stuff the NSRunLoop does for you.

Marcel

--
Marcel Weiher				Metaobject Software Technologies
marcel at metaobject.com		www.metaobject.com
Metaprogramming for the Graphic Arts.   HOM, IDEAs, MetaAd etc.




More information about the Squeak-dev mailing list