Boost logo

Boost :

Subject: Re: [boost] [thread] Can boost::this_thread::sleep_for() totally stop the thread?
From: Klaim - Joël Lamotte (mjklaim_at_[hidden])
Date: 2013-07-29 08:44:16

As someone suggested to me in the comments of the page, I re-implemented
the loop using
a condition_variable so that pushing a task in the queue notify it.

I have a friend who can reproduce the bug systematically (windows Vista,
core 2 duo) so
I sent him versions:

 - removing the sleep call works (but is a bit less performant apparently)
 - changing the loop to use condition_variable works

So it looks like the sleep call does have a strange behaviour but I don't
know the source of the problem.
Using the condition_variable seems more appropriate so I'll keep this fix
for now.

Joel Lamotte

Boost list run by bdawes at, gregod at, cpdaniel at, john at