Multiple processes using #nextPutAll:

Damien Cassou damien.cassou at gmail.com
Sat May 26 09:31:10 UTC 2007


2007/5/26, subbukk <subbukk at gmail.com>:
> On Friday 25 May 2007 10:00 pm, Damien Cassou wrote:
> I notice two issues with your code.
> First, If the code in block runs fast, then it is quite possible for one to
> finish its execution before the next one gets scheduled. Interleaving is
> required only if a process hogs the processor for too long. So it is quite
> possible for the array to contain three runs of 1:10000 in proper sequence.
> This is not an error.
>
> Secondly, yielding just lets background processes run, but does not guarantee
> that they have terminated. These processes have to signal the main process
> waiting in the foreground that they are done and then you can proceed to test
> the queue.

Thank you for this comments. That was what I was afraid of. Is it
possible to have test that will show #nextPutAll: is not protected?

-- 
Damien Cassou



More information about the Squeak-dev mailing list