From 4710e12fe123a65817375d2a9b8e476219f58f16 Mon Sep 17 00:00:00 2001 From: Oliver Kowalke Date: Sun, 18 Oct 2015 20:03:38 +0200 Subject: [PATCH] rename scheduler::re_schedule() -> scheduler::suspend() --- include/boost/fiber/scheduler.hpp | 2 +- src/context.cpp | 4 ++-- src/scheduler.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/fiber/scheduler.hpp b/include/boost/fiber/scheduler.hpp index 8cdee185..7d69e20d 100644 --- a/include/boost/fiber/scheduler.hpp +++ b/include/boost/fiber/scheduler.hpp @@ -118,7 +118,7 @@ public: std::chrono::steady_clock::time_point const&, std::function< void() > * = nullptr) noexcept; - void re_schedule( context *, + void suspend( context *, std::function< void() > * = nullptr) noexcept; bool has_ready_fibers() const noexcept; diff --git a/src/context.cpp b/src/context.cpp index 6d80434f..014c0c00 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -227,7 +227,7 @@ context::resume( std::function< void() > * func) { void context::suspend( std::function< void() > * func) noexcept { - scheduler_->re_schedule( this, func); + scheduler_->suspend( this, func); } void @@ -246,7 +246,7 @@ context::join() { active_ctx->wait_link( wait_queue_); lk.unlock(); // suspend active context - scheduler_->re_schedule( active_ctx); + scheduler_->suspend( active_ctx); // remove from wait-queue active_ctx->wait_unlink(); // active context resumed diff --git a/src/scheduler.cpp b/src/scheduler.cpp index 0256049b..168e1e73 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -355,7 +355,7 @@ scheduler::wait_until( context * active_ctx, } void -scheduler::re_schedule( context * active_ctx, +scheduler::suspend( context * active_ctx, std::function< void() > * func) noexcept { BOOST_ASSERT( nullptr != active_ctx); BOOST_ASSERT( main_ctx_ == active_ctx ||