I just need to pause and resume a thread programmatically. I will try to use the sleep method.