Process Scheduling/Threads

Daniel Salama dsalama at user.net
Wed Apr 13 14:36:20 UTC 2005


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).

Any ideas?

Thanks,
Daniel




More information about the Squeak-dev mailing list