Very very nice!

This is really cool.

Doru

On Thu, Feb 26, 2015 at 7:01 PM, Sven Van Caekenberghe <[email protected]> wrote:

> *Very* nice !
>
> > On 26 Feb 2015, at 18:55, Guillermo Polito <[email protected]>
> wrote:
> >
> > So I added an example of ProcessLocalSlot (like a thread local from
> other languages) using the existing ProcessLocalVariable. A variable has
> different values depending on the process the code is executing.
> >
> > Example of usage:
> >
> > Object subclass: #TestLocal
> >       slots: { #local => ProcessLocalSlot }
> >       classVariables: {  }
> >       category: 'SlotTestGuille'.
> >
> > object := TestLocal new.
> > object local: 55.
> > object local.
> >
> > [ valueInOtherProcess := object local ] fork.
> >
> > valueInOtherProcess. "=> nil"
> >
> > [ object local: 'String'.
> > valueInOtherProcess := object local ] fork.
> >
> > valueInOtherProcess. "=> 'String'"
> > object local "=> 55"
> >
> > Code in issue:
> https://pharo.fogbugz.com/f/cases/15004/Add-ProcessLocalSlot
> >
> > Guille
>
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"

Reply via email to