Threads or suggestion?

John M McIntosh johnmci at smalltalkconsulting.com
Sat Aug 10 18:15:58 UTC 2002


>John McIntosh wrote:
>>  >  > Then again you could write a different scheduler and
>>  build your own
>>  >VM to do what you want.
>>  >
>>  >Uggg...let me just add that to the pile of things to do.
>>  >
>>  >- Stephen
>>
>>  Ya, add that to the question of:
>>
>>  a) do you really know when a process context switch happens
>>  in Squeak....
>
>Funny you should mention that...just the other day I wanted to see if I
>could make some stuff happen when a process context switch occurs, and
>you're right...there's no way to do that in Squeak.  You wouldn't have
>any ideas about how to do that would you?


You need to look at
Interpreter>>transferTo:

which is only invoked from
Interpreter>>primitiveSuspend
Interpreter>>primitiveWait
Interpreter>>resume:

These methods
Interpreter>>resume:
Interpreter>>wakeHighestPriority
Interpreter>>putToSleep:

contain the bulk of the logic for the process scheduler.

Time to build your own VM.


-- 
--
===========================================================================
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