mirror of
https://github.com/boostorg/fiber.git
synced 2026-02-16 13:22:17 +00:00
remove class scheduler - fiber_context has static TLS
- detail:.scheduler was removed - fiber_context has a static thread-local pointer to the active fiber_context - fiber_context has member to pointer of fiber_manager - functions of fiber_manager are accessed only via fiber_context - if fiber f is resumed, the fiber_manager of the current active fiber f' is assigned to f -> that is necessary if f was stolen form another thread
This commit is contained in:
@@ -24,7 +24,7 @@ namespace fibers {
|
||||
void
|
||||
fiber::start_() {
|
||||
impl_->set_ready();
|
||||
detail::scheduler::instance()->spawn( impl_.get() );
|
||||
fiber_context::active()->do_spawn( * this);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -41,7 +41,7 @@ fiber::join() {
|
||||
"boost fiber: fiber not joinable");
|
||||
}
|
||||
|
||||
detail::scheduler::instance()->join( impl_.get() );
|
||||
fiber_context::active()->do_join( impl_.get() );
|
||||
|
||||
// check if joined fiber was interrupted
|
||||
std::exception_ptr except( impl_->get_exception() );
|
||||
|
||||
Reference in New Issue
Block a user