-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
As we konw, you use two parameraters 'shouldStop' and 'isStopped' to determine whether a thread is stopped or is stopping.
you have not use thread.stop() method to stop the thread itself straightly, but let the thread go die naturally.
while a thread need to stop, we set shouldStop = true;
and the executing thread is continue do what it shoud do, when id do this work and next loop is coming, the shouldStop's value is true, the thread set stopped = true; and end/exit the run() method and make the thread to DEAD STATE naturally,
am i right in this logic ?
looking forwward your reply ...
Metadata
Metadata
Assignees
Labels
No labels