Threads or suggestion?

Stephen Pair spair at acm.org
Fri Aug 9 01:46:01 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?

Hmmm...could you add a new context to the process that you are switching
into which will return to the real context that you need to resume
(perhaps Process>>resumingFrom: anotherProcess)?  But then, would that
mess up the stack of the actual context that needs to be resumed?  If
you could do something like that, it might be interesting to see if you
could schedule subclasses of Process (I've never tried it) that add
special behavior for Process>>resumingFrom:.

- Stephen

P.S.  I was trying to see if there was a way that I could do a bulk
identity swap when switching into certain processes (ones that are
operating in a transaction to be specific).




More information about the Squeak-dev mailing list