Hi anda

We are shot in time but we don't have any other solution so sure, give a try when you'll have free time It will be appreciated.

If the value never reaches the second thread, how would it know to stop?
I did tried using mutext, do you agree with me that the condition (variable) would be protected. The thread ONLY read the variable and do not change its value. The only thread changing the value of the variable is the external thread for the signal handler.

By the way, "OPTIMIZING" accesss for volatile keyword was a better definition than mine, thanks. But the idea was to explain you that I care about the variable shared access between the threads. Only ONE writter single writter so even if we were using an ATOMIC way, mutex, or any other sync method, the example should work anyway in this case.

Best regards,