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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user