I would like to add that the switchable TLS is only a half backed solution. It would't work in a multi core context where threads are truly executing in parallel. Two such threads might get the same TLS context which would invalidate its implicit predicate.

Another strategy would be to forbit use of TLS with threads using the event loop. But this might break existing code.

Reply via email to