Join GitHub today
Allow "static" access to the current Reactor #12
Sometimes, it happens that deep in user code, you need to get access to the context within which that code is executed, without having to pass that context all the way down from the top of the stack. This is usually done in Java using Thread-local instances. Since Reactors are our "lightweight threads", it makes most sense to give a static access to them. So we would be tracking the reactor in the PoolThread, to allow this to be implemented (set current reactor in thread, when switching of reactor, such that we can then get the current thread, cast it to PoolThread, and ask for the reactor).