[squeak-dev] problem with threads

Damien Cassou damien.cassou at gmail.com
Mon Mar 30 15:13:54 UTC 2009


On Mon, Mar 30, 2009 at 5:03 PM, Jordi Delgado <jdelgado at lsi.upc.edu> wrote:
> | s p1 p2 |
> s := SharedQueue new: 20.
> p1 := [1 to: 10 do: [:i | s nextPut: i. Processor yield.]] newProcess.
> p2 := [11 to: 20 do: [:i | s nextPut: i. Processor yield.]] newProcess.
> p1 priority: Processor activePriority - 1.
> p2 priority: Processor activePriority - 1.
> p1 resume. p2 resume.
> s inspect.

Try to rename your block variables i to i1 and i2. You can also try
sending the message #fixTemps to the blocks.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st



More information about the Squeak-dev mailing list