Efficient thread-local shared variables

Michael van der Gulik squeakml at gulik.co.nz
Tue Oct 24 07:39:47 UTC 2006


Andreas Raab wrote:
> Folks -
> 
> For a variety of reasons I am in dire need of the ability to vector 
> shared variables (globals, class vars and pool vars) through an extra 
> indirection vector per process (really per island but binding per 
> process seems to be simpler for now). Since I need this for *each and 
> every shared variable* it needs to be *very* efficient.
> 
> The question is: What is the most efficient way to implement such a 
> scheme? There are a couple of ways I can think about:

<snip>

> In any case, I'm trying to gather options. If any of you have any new 
> ideas or have tried one or the other (successfully or not) or have any 
> other comments to make I'd love to hear about it.

What is the bigger problem that you're trying to solve?

How often will the value of the shared variable differ between the one 
in the literal association and the per-process value? If they don't 
differ much, perhaps you can do some clever hack in the Interpreter 
fetch-literal bytecode implementations to first check if that literal 
has an "override" for the current process. I hope this is understandable.

Michael.




More information about the Squeak-dev mailing list