Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b186a01 commit 875404cCopy full SHA for 875404c
taskflow/executor/workstealing.hpp
@@ -585,12 +585,10 @@ void WorkStealingExecutor<Closure>::_explore_task(
585
// wasteful thief
586
else if(vtm != thief) {
587
size_t C = _workers[vtm].mailbox.load(std::memory_order_acquire);
588
- if(C && _workers[vtm].mailbox.compare_exchange_strong(C, 0,
+ if(C && _workers[vtm].mailbox.compare_exchange_strong(C, C-1,
589
std::memory_order_seq_cst,
590
std::memory_order_relaxed)) {
591
- for(size_t c=0; c<C; ++c) {
592
- _notifier.notify(false);
593
- }
+ _notifier.notify(false);
594
}
595
596
0 commit comments