Technologicat/unpythonic

Shim and ThreadLocalBox

Technologicat opened this issue · 2 comments

  • Shim needs a fallback object, in case it's holding a ThreadLocalBox whose contents haven't been set in the current thread.
  • ThreadLocalBox needs to validate that .x exists before reading it. Done in 179b32f.

Maybe the current solution (in ThreadLocalBox, hang on to the default value, use it in all threads that have not overridden it) is better than a fallback object? Will have to think about this...

Thought about it, yes, maybe this is not needed for now. Maybe later.

The issue of a fallback in Shim is orthogonal to ThreadLocalBox, which was solved by the default-value approach.