allow exiting command thread