This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
std::this_thread::yield doesn't work
- From: Keith Erickson <kerickso at pppl dot gov>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Sun, 20 Oct 2013 15:32:39 -0400
- Subject: std::this_thread::yield doesn't work
- Authentication-results: sourceware.org; auth=none
Calling std::this_thread::yield on g++ 4.8.1 doesn't actually result
in a call to the underlying pthread_yield or linux sched_yield. I
eventually found this to be related to a define:
_GLIBCXX_USE_SCHED_YIELD. How do I get that set, though? Is it
something I can define inside my program, or do I really have to go
and recompile the whole toolchain just to be able to use a basic
concurrency function?