Category: Language-Processes
Superclass: Link
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.

Method category index

accessing (instance)
basic (instance)
builtins (instance)
debugging (instance)
printing (instance)

accessing (instance)

externalInterruptsEnabled
Answer whether the receiver is executed with interrupts enabled

name

Answer the user-friendly name of the process.

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). If the process is temporarily suspended or waiting on a semaphore, it is temporarily woken up so that the interrupt is processed as soon as the process priority allows to do. Answer the receiver.

suspendedContext

Answer the context that the process was executing at the time it was suspended.

suspendedContext: aContext

Modify the context that the process was executing at the time it was suspended.

valueWithoutInterrupts: aBlock

Evaluate aBlock and delay all interrupts that are requested during its execution to after aBlock returns.

top


basic (instance)

context
Return the execution context of the receiver.

debugger

Return the object in charge of debugging the receiver. This always returns nil unless the DebugTools package is loaded.

finalize

Terminate processes that are GCed while waiting on a dead semaphore.

lowerPriority

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

primTerminate

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

raisePriority

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

singleStep

Execute a limited amount of code (usually a bytecode, or up to the next backward jump, or up to the next message send) of the receiver, which must in a ready-to-run state (neither executing nor terminating nor suspended), then restart running the current process. The current process should have higher priority than the receiver. For better performance, use the underlying primitive, Process>>#singleStepWaitingOn:.

terminate

Terminate the receiver after having evaluated all the #ensure: and #ifCurtailed: blocks that are active in it. This is done by signalling a ProcessBeingTerminated notification.

terminateOnQuit

Mark the receiver so that it is terminated when ObjectMemory class>>#quit: is sent.

top


builtins (instance)

resume
Resume the receiver's execution

singleStepWaitingOn: aSemaphore

Execute a limited amount of code (usually a bytecode, or up to the next backward jump, or up to the next message send) of the receiver, which must in a ready-to-run state (neither executing nor terminating nor suspended), then restart running the current process. aSemaphore is used as a means to synchronize the execution of the current process and the receiver and should have no signals on it. The current process should have higher priority than the receiver.

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 yielding control to another process

yield

Yield control from the receiver to other processes

top


debugging (instance)

detach
Do nothing, instances of Process are already detached.

top


printing (instance)

printOn: aStream
Print a representation of the receiver on aStream

top