If interrupting the thread is not an option, another is to place a “marker” or “command” object on the queue that would be recognized as such by MyObjHandler and break out of the loop.
If interrupting the thread is not an option, another is to place a “marker” or “command” object on the queue that would be recognized as such by MyObjHandler and break out of the loop.