[Seaside-dev] Re: WAContext Refactoring
John O'Keefe
wembley.instantiations at gmail.com
Mon Apr 7 13:23:22 UTC 2008
VA Smalltalk will be quite happy to use Process-local variables -- the
implementation you show works just fine for us.
On Sat, Mar 29, 2008 at 4:45 PM, Lukas Renggli <renggli at gmail.com> 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
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> seaside-dev mailing list
> seaside-dev at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
>
--
John O'Keefe [|], Principal Smalltalk Developer, Instantiations Inc.
More information about the seaside-dev
mailing list