Back: ProcessorScheduler-timed invocation Up: Base classes Forward: ProcessVariable class-accessing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.133 ProcessVariable

Defined in namespace Smalltalk
Superclass: LookupKey
Category: Language-Processes
I represent a proxy for a thread-local variable defined for a process. Requesting the value will return the thread-local setting for the current process.

1.133.1 ProcessVariable class: accessing  (class)
1.133.2 ProcessVariable: accessing  (instance)


1.133.1 ProcessVariable class: accessing

key: anObject
Return a new ProcessVariable with the given key. Not that the key need not be a symbol or string, for example you could use an array #(#{class name} 'name'). Setting the variable's value will automatically create it in the current process, while removal must be done by hand through the ProcessEnvironment singleton object.

new
Return a new ProcessVariable with a new anonymous but unique key. It is suggested to use a descriptive name instead to ease debugging. Setting the variable's value will automatically create it in the current process, while removal must be done by hand through the ProcessEnvironment singleton object.


1.133.2 ProcessVariable: accessing

environment
Return the environment in which this ProcessVariable lives. This is the singleton instance of ProcessEnvironment for all variables.

use: anObject during: aBlock
Set the value of this variable to anObject during the execution of aBlock, then restore it.

value
Return the value of this variable in the current process.

value: anObject
Set the value of the current process's copy of the variable to be anObject.

valueIfAbsent: aBlock
Return the value of this variable in the current process.



Back: ProcessVariable class-accessing Up: ProcessVariable Forward: Promise   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on April, 16 2013 using texi2html