== Quote from Sean Kelly ([email protected])'s article
> dsimcha Wrote:
> >
> > I don't know the details of how TLS is implemented.  Would it be possible 
> > to reset
> > all TLS data for a given thread?
> Definitely for some platforms, possibly for all of them (perhaps requiring 
> some
trickery).  Look at thread_entryPoint in core.thread for a clue on how TLS is
implemented.

Interesting.  Now that I've given it more thought, though, using this is 
probably
a bad idea for lightweight task-based concurrency because resetting TLS at all
properly would require re-running thread-local module c'tors (arbitrarily
expensive), not just blitting a few things (cheap).  I guess I'll have to resort
to disallowing arbitrary indirection in return types in any safe subset of
std.parallelism.

Reply via email to