Function Reactor.assertMayContextSwitch

Make sure we are allowed to context switch from this point.

void assertMayContextSwitch (
  string message
) nothrow @nogc @safe;

This will be called automatically if an actual context switch is attempted. You might wish to call this function explicitly, however, from contexts that might context switch, so that they fail even if they don't actually attempt it, in accordance with the "fail early" doctrine.