Back: PositionableStream-truncating
Up: Class reference
Forward: Process class-basic
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

6.114 Process

Defined in namespace Smalltalk
Category: Language-Processes
I represent a unit of computation. My instances are independantly executable blocks that have a priority associated with them, and they can suspend themselves and resume themselves however they wish.

6.114.1 Process class: basic  (class)
6.114.2 Process: accessing  (instance)
6.114.3 Process: basic  (instance)
6.114.4 Process: builtins  (instance)
6.114.5 Process: printing  (instance)


6.114.1 Process class: basic

on: aBlockContext at: aPriority
Private - Create a process running aBlockContext at the given priority


6.114.2 Process: accessing

name
Answer `name'.

name: aString
Give the name aString to the process

priority
Answer the receiver's priority

priority: anInteger
Change the receiver's priority to anInteger

queueInterrupt: aBlock
Force the receiver to be interrupted and to evaluate aBlock as soon as it becomes the active process (this could mean NOW if the receiver is active). Answer the receiver


6.114.3 Process: basic

forceResume
Private - Force a resume of the process from whatever status it was in (even if it was waiting on a semaphore). This is BAD practice, it is present only for some future possibility.

lowerPriority
Lower a bit the priority of the receiver. A #lowerPriority will cancel a previous #raisePriority, and vice versa.

raisePriority
Raise a bit the priority of the receiver. A #lowerPriority will cancel a previous #raisePriority, and vice versa.

suspend
Do nothing if we're already suspended. Note that the blue book made suspend a primitive - but the real primitive is yielding control to another process. Suspending is nothing more than taking ourselves out of every scheduling list and THEN yield control to another process

terminate
Terminate the receiver - This is nothing more than prohibiting to resume the process, then suspending it.


6.114.4 Process: builtins

resume
Resume the receiver's execution

yield
Yield control from the receiver to other processes


6.114.5 Process: printing

printOn: aStream
Print a representation of the receiver on aStream




This document was generated on May, 12 2002 using texi2html