Stelian Ionescu writes:
The whole point of special variables is to make it oblivious whether one is using the global binding or a thread-local binding, so code shouldn't be aware of that in general.
Attached is the patch I went with courtesy you and Chun Tian - it works very nicely, thank you both :)
In summary, the approach I took was:
1. Use a helper to create a handler closure that closes over the shadowed variables, thereby making the correct values available on all threads.
2. Add the root path to the request class, conceptually treating requests as relative to a particular root, and handily avoiding the same threading + shadowed variable issue with *germinal-root*.
Now I can set a temporary context in my tests with a let form, and the world is a happier place :)
Happy New Year :)
-- Duncan Bayne +61 420 817 082 | https://duncan.bayne.id.au/
I usually check my mail every 24 - 48 hours. If there's something urgent going on, please send me an SMS or call me.