Merge branch 'develop'
This commit is contained in:
commit
0fce2b61c7
@ -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;
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user