Boost logo

Boost Users :

Subject: Re: [Boost-users] [Thread] Timed join returning true before thread terminated
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2012-03-16 04:51:35

On 15/03/12 22:44, Vicente J. Botet Escriba wrote:
> I agree that disabling interrupts is the correct way to avoid new
> interruptions. But you need to clear them before.

Disabling interrupts doesn't stop the flag being set, it just stops the
interruption points acting on it. There is thus no need to clear the
flag. If you want to call code with an interruption point without being
interrupted, disable interruptions. Whether or not the flag is set
beforehand, or set during the call is now irrelevant. It may or may not
be set at the end of the block either way.


Author of C++ Concurrency in Action
just::thread C++11 thread library   
Just Software Solutions Ltd
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at