Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Process
Last updated at 1:02 am UTC on 17 January 2006
A Process is an independent thread of execution.

Creating New Threads

The easiest way to create a new thread is the fork method:
[(Delay forSeconds: 5) wait. Beeper beep] fork


You can also use newProcess, if you'd like to create a process that is not running. When are ready to start the process, use resume:
process := [(Delay forSeconds: 5) wait. Beeper beep] newProcess.
"do whatever you want in here..."
process resume.



Process priorities

Every Process has a priority. Processes with higher priorities preempt processes with lower priority. You can read and change the priority of a process using the priority and priority: methods.

There are a number of named priorities; see the class methods of Process for what is available.


Finding Existing Processes

To see the existing processes, including the current process, see Processor.



See Also

Squeak Threading Model
Process Browser