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?
Yes, this appears to be an issue similar to the one with _GLIBCXX_USE_NANOSLEEP
. GCC has yield
conditionally 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With