[Glass] Strange behavior with ProcessLocalVariable ?

Mariano Martinez Peck marianopeck at gmail.com
Fri Nov 22 15:02:37 PST 2013


Hi Dale,

Of course, the nil I get is the one from #default:

value
"Answer the current value for this variable in the current context."
^Processor activeProcess environmentAt: self ifAbsent: [self default].

So maybe I am getting different processes instances for the #value:  and
the #value  ...  while in Pharo it is the same...

Question: is there a way to inspect or print to transcript from gemstone to
the GemTools? I mean...say I want to do some Transcript show: in the code
that is running  or some inspect, and I want that they are seen in the
transcript / ide of GemTools. Is that possible?

Thanks!




On Fri, Nov 22, 2013 at 7:17 PM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:

>
>
>
> On Fri, Nov 22, 2013 at 6:55 PM, Dale K. Henrichs <
> dale.henrichs at gemtalksystems.com> wrote:
>
>> I'm not that familiar with the implementation of ProcessLocalVariable ...
>> is it exception-based or does it associate the variables with a process?
>>
>
> The latter. Class comment of ProcessSpecificVariable says: "There are two
> kinds of process-specific variables: process-local (state available
> for read and write in all methods inside the process), and dynamic
> variables (implementing dynamic scope)."
>
>
>
>>  What "different" bahavior are you seeing?
>>
>
> I have MyWebSession (subclass of WASession). Upong user login, I set a
> some data into a subclass of ProcessSpecificVariable.
> Pseudo-Example
>
> MySession >> login
> ...
> "after login..."
> dict := Dictionary with .. "a dict with data"
> MySubclassOfProcessSpecificVariable value: dict.
>
> And then at some point later in seaside, from anyware I can do:
>
> myDict := MySubclassOfProcessSpecificVariable value
>
> and access the data...
>
> So the difference is that in Pharo, the above line
> MySubclassOfProcessSpecificVariable value answers the dict, while in
> Gemstone answers nil.
>
>
>> I guess that means that at least I'm not aware of anything that should
>> behave differently ....
>>
>> I do wonder if you are seeing this different behavior in a GemTools
>> session or topaz or during Seaside operation? .... if exceptions are making
>> their way up to GemTools via Gci, then there is some potential for process
>> oddities but just potential .... no smoking guns ... if the process locals
>> are associated with continuations, then things can get a little more
>> complicated and the possibility of bugs increase:)
>>
>>
> This is during a GemToools session. I will try with topaz...
>
> Thanks,
>
>
>
>> Dale
>> ------------------------------
>>
>> *From: *"Mariano Martinez Peck" <marianopeck at gmail.com>
>> *To: *glass at lists.gemtalksystems.com
>> *Sent: *Friday, November 22, 2013 12:30:19 PM
>> *Subject: *[Glass] Strange behavior with ProcessLocalVariable ?
>>
>>
>> Hi guys...I am having a different behavior in GemStone than in Pharo.
>> I am using a subclass of ProcessLocalVariable  where I use #value: and
>> #value to store/retrieve some stuff that belongs to the current process
>> being executed.
>>
>> Before digging deeper...let me ask...should this work? Or there is
>> something strange in GemStone?
>>
>> Thanks,
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
>>
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20131122/a7645588/attachment.html>


More information about the Glass mailing list