add interruption in workerthread