16 #ifndef TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_TEST_UTIL_FAKE_THREAD_POOL_FACTORY_H_
17 #define TENSORFLOW_SERVING_SERVABLES_TENSORFLOW_TEST_UTIL_FAKE_THREAD_POOL_FACTORY_H_
21 #include "tensorflow/core/lib/core/status.h"
22 #include "tensorflow/core/platform/macros.h"
23 #include "tensorflow/core/platform/threadpool.h"
24 #include "tensorflow_serving/servables/tensorflow/test_util/fake_thread_pool_factory.pb.h"
25 #include "tensorflow_serving/servables/tensorflow/thread_pool_factory.h"
27 namespace tensorflow {
35 static Status Create(
const FakeThreadPoolFactoryConfig& config,
36 std::unique_ptr<ThreadPoolFactory>* result);
45 void SetInterOpThreadPool(
46 std::shared_ptr<thread::ThreadPoolInterface> thread_pool) {
47 inter_op_thread_pool_ = thread_pool;
49 void SetIntraOpThreadPool(
50 std::shared_ptr<thread::ThreadPoolInterface> thread_pool) {
51 intra_op_thread_pool_ = thread_pool;
55 std::shared_ptr<thread::ThreadPoolInterface> inter_op_thread_pool_;
56 std::shared_ptr<thread::ThreadPoolInterface> intra_op_thread_pool_;