Specifying function execution contexts
In asynchronous code, it is common to have callbacks and other functions that need to be run in a specific “execution context”.
Limited approaches for specifying execution context involve specifying a queue or thread on which to run the function but these only capture a small subset of possible traits that might fall under the banner of “execution context”. Technically, an “execution context” might include any state on the stack, current thread, entire program or even the host environment outside the program.