diff --git a/ortools/base/threadpool.cc b/ortools/base/threadpool.cc index 0da27868ba8..e82c9c569b9 100644 --- a/ortools/base/threadpool.cc +++ b/ortools/base/threadpool.cc @@ -14,7 +14,6 @@ #include "ortools/base/threadpool.h" #include "absl/log/check.h" -#include "ortools/base/callback.h" namespace operations_research { void RunWorker(void* data) { @@ -88,9 +87,4 @@ void ThreadPool::Schedule(std::function closure) { } } -void ThreadPool::Add(Closure* closure) { - assert(closure != nullptr); - Schedule([closure] { closure->Run(); }); -} - } // namespace operations_research diff --git a/ortools/base/threadpool.h b/ortools/base/threadpool.h index 597e033e99e..7595afed6ba 100644 --- a/ortools/base/threadpool.h +++ b/ortools/base/threadpool.h @@ -22,8 +22,6 @@ #include // NOLINT #include -#include "ortools/base/callback.h" - namespace operations_research { class ThreadPool { public: @@ -34,7 +32,6 @@ class ThreadPool { void Schedule(std::function closure); std::function GetNextTask(); void SetQueueCapacity(int capacity); - void Add(Closure* closure); private: const int num_workers_;