Back: PositionableStream-truncating Up: Base classes Forward: Process-accessing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.132 Process

Defined in namespace Smalltalk
Superclass: Link
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.

1.132.1 Process: accessing  (instance)
1.132.2 Process: basic  (instance)
1.132.3 Process: builtins  (instance)
1.132.4 Process: debugging  (instance)
1.132.5 Process: printing  (instance)


1.132.1 Process: accessing

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.


1.132.2 Process: basic

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.

makeUntrusted: aBoolean
Set whether the receiver is trusted or not.

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.


1.132.3 Process: builtins

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


1.132.4 Process: debugging

detach
Do nothing, instances of Process are already detached.


1.132.5 Process: printing

printOn: aStream
Print a representation of the receiver on aStream



Back: Process-debugging Up: Process Forward: ProcessEnvironment   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on August, 19 2010 using texi2html