[Seaside-dev] Re: WAContext Refactoring
Lukas Renggli
renggli at gmail.com
Sat Mar 29 20:45:31 UTC 2008
Ehh ... after writing down our problems we noticed that it is all much
simpler ;-)
The question is now very simple. Are all platforms ready to provide
thread specific variables?
We added class WAProcessVariable that uses exactly the same protocol
as WADynamicVariable but internally uses a process local variable. In
Squeak this is implemented like:
WAProcessVariable>>use: anObject during: aBlock
Processor activeProcess properties at: self put: anObject.
^ aBlock ensure: [ Processor activeProcess properties removeKey: self ]
WAProcessVariable>>value
^ Processor activeProcess properties at: self ifAbsent: [ self defaultValue ]
Could all platforms provide something like that?
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch
More information about the seaside-dev
mailing list