Link to home
Start Free TrialLog in
Avatar of prain
prainFlag for United States of America

asked on

boost::thread::sleep() question

I am having a wrapper thread class that wraps boost::thread instance to create a thread.

If mThread is the boost::thread, why is that

  void Thread::sleep(long milliseconds)
    {
      mThread->sleep(boost::posix_time::milliseconds(milliseconds));
    }  

does not work. I have seen couple of examples like this onthe net. Can someone help?
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of prain

ASKER

I've requested that this question be deleted for the following reason:

Did not receive the intended solution
Hi prain,

sorry, I understand that you don't like the answer I wrote because you hoped it's possible to let another thread sleep this way, but that doesn't mean the answer is not correct.

Sometimes the only correct answer to a question unfortunateley is "No" or "That's not possible".

Therefore I'm against deleting this question.

ZOPPO