I tried to yield current thread:
std::this_thread::yield();
But unfortunately GCC knows better:
‘yield’ is not a member of ‘std::this_thread’
Have I forgotten about some hack similar to D_GLIBCXX_USE_NANOSLEEP, or what?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, this appears to be an issue similar to the one with
_GLIBCXX_USE_NANOSLEEP. GCC hasyieldconditionally compiled depending on the macro_GLIBCXX_USE_SCHED_YIELD. It should compile if you define that.This will be fixed as of GCC 4.8.