While developing hexchat-plugin I ran into a little issue: thread-local storage is currently global.
This is a bit of an issue and it’d be cool to have namespaced TLS.
The namespace is not thread-local, instead it gets shared between threads. But the namespace stores thread-locals efficiently. When the thread exits or the namespace gets destroyed, things get deallocated, also importantly is that there shouldn’t be any locks.
This matters when unloading hexchat plugins. I don’t want the thread locals to carry over or leak.