Browse Source
Merge pull request #2247 from lioncash/include
common/thread_queue_list: Remove unnecessary dependency on boost
pull/15/merge
bunnei
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
4 deletions
-
src/common/CMakeLists.txt
-
src/common/thread_queue_list.h
|
|
|
@ -134,4 +134,4 @@ endif() |
|
|
|
|
|
|
|
create_target_directory_groups(common) |
|
|
|
|
|
|
|
target_link_libraries(common PUBLIC Boost::boost fmt microprofile) |
|
|
|
target_link_libraries(common PUBLIC fmt microprofile) |
|
|
|
@ -6,7 +6,6 @@ |
|
|
|
|
|
|
|
#include <array> |
|
|
|
#include <deque> |
|
|
|
#include <boost/range/algorithm_ext/erase.hpp> |
|
|
|
|
|
|
|
namespace Common { |
|
|
|
|
|
|
|
@ -111,8 +110,9 @@ struct ThreadQueueList { |
|
|
|
} |
|
|
|
|
|
|
|
void remove(Priority priority, const T& thread_id) { |
|
|
|
Queue* cur = &queues[priority]; |
|
|
|
boost::remove_erase(cur->data, thread_id); |
|
|
|
Queue* const cur = &queues[priority]; |
|
|
|
const auto iter = std::remove(cur->data.begin(), cur->data.end(), thread_id); |
|
|
|
cur->data.erase(iter, cur->data.end()); |
|
|
|
} |
|
|
|
|
|
|
|
void rotate(Priority priority) { |
|
|
|
|