Delay joining with dataflow worker thread until we know it exited. In the previous situation, it could happen that we signal that one thread should exit, but all threads are working and so no thread exits immediately.  We would then wait until one thread finally finishes its work and exits.
Delay joining with dataflow worker thread until we know it exited.
In the previous situation, it could happen that we signal that one
thread should exit, but all threads are working and so no thread exits
immediately.  We would then wait until one thread finally finishes its
work and exits.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb