Merge "Shutdown worker thread when not needed"