l*m 发帖数: 824 | 1
if you use multiThread, you can do a public counter=0. for
every thread, which you want to monitor, you counter++ when
you start that thread, and counter-- when you quit that
thread.
and your exit thread just check the counter, if it is 0
you can quit, if it is greater than 0 you can sleep some
time and check again. |
|