Scoped variables

David Lloyd david.lloyd at
Wed Dec 5 00:07:59 UTC 2018

On Tue, Dec 4, 2018 at 6:06 PM John Rose <john.r.rose at> wrote:
> On Dec 4, 2018, at 1:46 PM, David Lloyd <david.lloyd at> wrote:
> In fact
> static thread locals can be used to implement probably most of the
> suggested mechanisms...
> That seems unlikely, since in Loom stack frames are carried by
> fibers, and fibers freely circulate across threads.  The implication
> of this is that fiber mount/unmount would have to push display
> information into static thread locals; if there are N of them (statically
> defined), then there is Nx as much churn for mount/dismount.
> Seems like a dead end to me.

Only if you have a 1:1 relationship between task and thread locals,
which I agree is a losing strategy, but if you could group all your
task-locals into one object then you could activate them with a single
swap, which is really where you want to be.


More information about the loom-dev mailing list