manoj.m
March 6th, 2006, 09:45 AM
hai,
can we suspend a thread with in the procedure it is using?
can we suspend a thread with in the procedure it is using?
|
Click to See Complete Forum and Search --> : SuspendThread issue manoj.m March 6th, 2006, 09:45 AM hai, can we suspend a thread with in the procedure it is using? Arjay March 6th, 2006, 10:43 AM Yes you can, but you need to consider how to wake it up afterward. If you suspend it within its thread proc, you won't be able to resume it from the same proc. The only way to resume it is from another thread. A way around this issue is to set an event from within the thread proc (T2). Another thread (T1) checks the event and suspends T2. T1 is responsible for resuming T2 when other criteria has been met. In other words, the thread (T2) is externally controlled. Arjay codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |