[ANN] Process-Specific Variables
"Martin v. Löwis"
martin at v.loewis.de
Tue Mar 13 19:03:24 UTC 2007
I'd like to announce the first release of Process-Specific Variables,
from
http://www.squeaksource.com/ProcessLocalStorage.html
Process-specific variables are variables that are neither global
nor specific to an object (like instance variables) or to a class.
Instead, they can have a different value in the context of each
Process.
New variables are declared by inheriting from a base class, similar
to the way WADynamicVariable of Seaside works.
There are two kinds of process-specific variables:
- ProcessLocalVariable is the base class for process-specific
read-write variables. They are similar to thread-local storage
(TLS) available in various operating systems. Reading and writing
uses #value and #value:
- DynamicVariable is the base class of dynamically-scoped read-only
variables. They are similar to the dynamic scoping in LISP.
They can be read using #value, and set for the duration of a block
with #value:during:
The implementation uses a per-process dictionary which is keyed by
the variable class.
Comments are welcome,
Martin
More information about the Squeak-dev
mailing list
|