#fork and deterministic resumption of the resulting process

Paolo Bonzini bonzini at gnu.org
Tue Feb 5 10:36:53 UTC 2008


Andreas Raab wrote:
> Paolo Bonzini wrote:
>> I'm with Terry on the correct idiom to use, i.e.
>>
>>     workerProcess := [self runWorkerProcess] newProcess.
>>     workerProcess resume.
> 
> Sigh. One of the problems with examples is that they are ... well 
> examples. They are not the actual code. The above solution is simply not 
> applicable in our context (if it were, I would agree with it as the 
> better solution).

Can you explain better?

My problem with your solution is that in principle the priority-1 
process that you create could never be scheduled if you have two 
processes already running at the "right" priority.  So you trade one 
"almost never happens" situation with another.

Paolo



More information about the Squeak-dev mailing list