[Seaside-dev] Re: WAContext Refactoring

Michael Lucas-Smith mlucas-smith at cincom.com
Sat Mar 29 20:54:25 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?
>
>   
We'd be delighted to use process variables!

Michael


More information about the seaside-dev mailing list