2
0
mirror of https://github.com/boostorg/fiber.git synced 2026-02-17 13:42:21 +00:00

support this_fiber::yield()

This commit is contained in:
Oliver Kowalke
2015-09-18 17:48:57 +02:00
parent 7d448f4943
commit 8a9c9916c7
7 changed files with 101 additions and 8 deletions

View File

@@ -143,6 +143,14 @@ context::join() noexcept {
}
}
void
context::yield() noexcept {
// get active context
context * active_ctx = context::active();
// yield active context
scheduler_->yield( active_ctx);
}
bool
context::wait_is_linked() {
return wait_hook_.is_linked();