scheduler: Add explanations for YieldWith and WithoutLoadBalancing

This commit is contained in:
Zach Hilman 2018-11-22 00:33:53 -05:00
parent b1c19bc88f
commit 1a72e1681c
6 changed files with 141 additions and 79 deletions

View file

@ -6,7 +6,6 @@
#include <array>
#include <deque>
#include <functional>
#include <boost/range/algorithm_ext/erase.hpp>
namespace Common {
@ -50,7 +49,8 @@ struct ThreadQueueList {
return T();
}
T get_first_filter(std::function<bool(T)> filter) const {
template <typename UnaryPredicate>
T get_first_filter(UnaryPredicate filter) const {
const Queue* cur = first;
while (cur != nullptr) {
if (!cur->data.empty()) {