|
There is an endless loop in thread A. The exit of the endless loop depends on thread B running to somewhere A. Currently, the busy waiting method is used, that is, the loop exit flag flag is modified at point A in thread B. Endless loop measurement
Try the mark and exit. But when I'm so busy waiting for too much time, I want to change the method.
I want to use the condition variable method, but waiting for the arrival of the signal in the loop of thread A will hang up A, because A must run constantly, so it cannot be suspended.
Is there any way for everyone?
Thank you! |
|