Merge branch 'develop'

This commit is contained in:
Oliver Kowalke 2019-06-27 11:25:50 +02:00
commit 0fce2b61c7
2 changed files with 17 additions and 0 deletions

View File

@ -371,6 +371,9 @@ of shared_work, thus the work is distributed equally over all threads.
namespace algo {
class shared_work : public algorithm {
shared_work();
shared_work( bool suspend);
virtual void awakened( context *) noexcept;
virtual context * pick_next() noexcept;
@ -384,6 +387,19 @@ of shared_work, thus the work is distributed equally over all threads.
}}}
[heading Constructor]
shared_work();
shared_work( bool suspend);
[variablelist
[[Effects:] [Constructs work-sharing scheduling algorithm.]]
[[Throws:] [`system_error`]]
[[Note:][If `suspend` is set to `true` (default is `false`), then the scheduler suspends if no ready fiber
could be stolen. The scheduler will by woken up if a sleeping fiber times out or it was notified from remote
(other thread or fiber scheduler).]]
]
[member_heading shared_work..awakened]
virtual void awakened( context * f) noexcept;

View File

@ -227,6 +227,7 @@ scheduler::schedule_from_remote( context * ctx) noexcept {
BOOST_ASSERT( nullptr != dispatcher_ctx_.get() );
// push new context to remote ready-queue
ctx->remote_ready_link( remote_ready_queue_);
lk.unlock();
// notify scheduler
algo_->notify();
}