[Seaside-dev] Re: WAContext Refactoring
Dale Henrichs
dale.henrichs at gemstone.com
Sat Mar 29 23:22:38 UTC 2008
Lukas Renggli wrote:
> 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
>
GemStone does not have thread locals ... I imagine that it won't be too
hard to add, but it will take vm modifications...
Dale
More information about the seaside-dev
mailing list