While this state is not actually needed by more than one test, we can just make it a static variable.
This test harness ensures consistent non-blocking semantics and validates that we have solved the toctou condition. The __global_context_for_test is a bit of a hack to fuse together the test supplied proc and the executing logic in packaage chan.
core:sync
core:sync/chan