Process Scheduling/Threads

Ron Jeffries ronjeffries at
Wed Apr 13 15:33:29 UTC 2005

If I recall correctly, Smalltalk forks only yield when explicitly
told to. So if there had been a "Processor yield" in each fork, I
think you'd have seen more what you were looking for.

Ron Jeffries
Will Turner: This is either madness or brilliance.
Captain Jack Sparrow: It's remarkable how often those two traits coincide. 

On Wednesday, April 13, 2005, at 10:36:20 AM, Daniel Salama wrote:

> I ran the following:

> queue := SharedQueue new.
> [10000 timesRepeat: [queue nextPut: 1]] fork.
> [10000 timesRepeat: [queue nextPut: 2]] fork.
> queue inspect.

> and when I inspected "queue", it shows all 1s and then all 2s. If I'm
> forking these two processes, shouldn't they run concurrently? I should
> be able to see 1s and 2s mixed up.

> Then looking into this, I came across someone that said I should 
> execute:

> ProcessorScheduler startTimeSlicing.

> before anything. However, I couldn't find this method in Squeak's 
> ProcessorScheduler (it may be a VW thing).

More information about the Squeak-dev mailing list