Add interface to force thread's termination