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

remove std::mutex associated with yield-queue

This commit is contained in:
Oliver Kowalke
2015-10-11 08:42:48 +02:00
parent d4c7232fa2
commit 01dda0048f
2 changed files with 0 additions and 4 deletions

View File

@@ -89,7 +89,6 @@ private:
sleep_queue_t sleep_queue_;
bool shutdown_;
detail::spinlock remote_ready_splk_;
std::mutex mtx_;
void resume_( context *, context *);

View File

@@ -106,7 +106,6 @@ scheduler::remote_ready2ready_() {
void
scheduler::yield2ready_() {
std::unique_lock< std::mutex > lk( mtx_);
// get context from yield-queue
while ( ! yield_queue_.empty() ) {
context * ctx = & yield_queue_.front();
@@ -360,9 +359,7 @@ scheduler::yield( context * active_ctx) noexcept {
// in work-sharing context (multiple threads read
// from one ready-queue) the context must be
// already suspended until another thread resumes it
std::unique_lock< std::mutex > lk( mtx_);
active_ctx->yield_link( yield_queue_);
lk.unlock();
// resume another fiber
resume_( active_ctx, get_next_() );
}