This solves race condition in unit tests if you try to shutdown a worker...

... which cleans up worker state while you also try to wait for worker to launch by reading the same

state.