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

link/unlink of context protected by spinlock

This commit is contained in:
Oliver Kowalke
2015-09-28 19:58:22 +02:00
parent eb7c4249d5
commit a847baa932
8 changed files with 92 additions and 20 deletions

View File

@@ -68,7 +68,7 @@ recursive_mutex::lock() {
// store this fiber in order to be notified later
detail::spinlock_lock lk( wait_queue_splk_);
BOOST_ASSERT( ! ctx->wait_is_linked() );
wait_queue_.push_back( * ctx);
ctx->wait_link( wait_queue_);
lk.unlock();
// suspend this fiber
ctx->suspend();