Btw, I think one better fix is to move the `w.current.state.StopPrefetcher()` operation into the `mainLoop`.  Since `w.current` is only available in this loop and you can tear down it in the defer function if the worker is stopped.