Bug fix - may cause deadlock when stopping working thread
SIGINT handler added