title: Is it possible to have "thread" local variables in Node?
body: <p>I would like to store a variable that is shared between all stack frames (top down) in a call chain. Much like ThreadLocal in Java or C#.</p>
  
  <p>I have found <a href="https://github.com/othiym23/node-continuation-local-storage" rel="noreferrer">https://github.com/othiym23/node-continuation-local-storage</a> but it keeps loosing context for all my use cases and it seems that you have to patch the libraries you are using to make it local-storage-aware which is more or less impossible for our code base.</p>
  
  <p>Are there really not any other options available in Node? Could domains, stacktraces or something like that be used to get a handle (id) to the current call chain. If this is possible I can write my own thread-local implementation.</p>