Fix shutdown procedure of ContinuousWorkerThread (it won't stop if interrupt() has been invoked during the thread is running)