Scoped variables

Ron Pressler ron.pressler at
Tue Dec 4 15:26:16 UTC 2018

While thread-locals could be used as an approximation of processor locals, obviously
any fiber-local variable (using any kind of API) would not be a good fit because there
are orders-of-magnitude more fibers than cores. So some form of “processor local” variables
 is yet another thing we’re working on :)


On December 4, 2018 at 3:04:35 PM, Douglas Surber (douglas.surber at wrote:

For what it is worth all the uses I have made of ThreadLocals are simpler than what I understand of this discussion. Yes, I have seen others use them in more sophisticated ways, but I haven't. I have only used ThreadLocals to avoid lock contention on Objects that could otherwise be static. In my uses I don't need or even want an Object per Java Thread. What would be better is an Object per core. Context switch while in a critical section of the Object would be problematic so Object per core might not be practical, but if it could be made to work it would be the ideal for my use cases.  


> On 12/3/18 2:55 PM, John Rose wrote:  
>> In part we are drawing on the very old idea of a Lisp "SPECIAL" variable.  

More information about the loom-dev mailing list