A lot of places I see code like this:
void threadFunction()
{
boost::this_thread::disable_interruption disable;
while (!boost::this_thread::interruption_requested())
{
//do stuff
}
}
For me this looks like I "disable" the thread function from being interrupted, but then again I test for an interruption. Miraculously, it works. Can someone explain to me what it actually does behind the scenes? Thank you!