`std.concurrency` is meant to make all these control flow systems easy to avoid races for, even in `@safe` code. Sending the boolean instead of keeping a pointer to a shared boolean can alleviate a lot of these problems.
Do keep in mind that if you're going to be using tightly parallel access to shared memory, you'll want to look at the core.atomic facilities.
Andy
