5 ms·
> What would it even mean to have a lambda reference to a variable who's stack frame has already popped? That bit is simple - the variable is kept alive as lon
by chrisseaton 8y ago
> What would it even mean to have a lambda reference to a variable who's stack frame has already popped?
That bit is simple - the variable is kept alive as long as there is still a lambda that references it.
Don’t think about stacks - that’s an implementation detail and the compiler is free to use a combination of the stack and the heap to implement local variables.
The issue I’m talking about is if one thread writes a local and another reads it, what does that look like?