Rename GrpcRpcManager -> ThreadManager

pull/8269/head
Sree Kuchibhotla 8 years ago
parent 96766195a6
commit 8f7739bcd6
  1. 8
      BUILD
  2. 4
      CMakeLists.txt
  3. 100
      Makefile
  4. 28
      build.yaml
  5. 15
      include/grpc++/server.h
  6. 2
      src/cpp/server/server_builder.cc
  7. 30
      src/cpp/server/server_cc.cc
  8. 45
      src/cpp/thread_manager/thread_manager.cc
  9. 62
      src/cpp/thread_manager/thread_manager.h
  10. 12
      test/cpp/thread_manager/thread_manager_test.cc
  11. 16
      test/cpp/thread_manager/thread_manager_test.h
  12. 4
      tools/doxygen/Doxyfile.c++.internal
  13. 48
      tools/run_tests/sources_and_headers.json
  14. 84
      tools/run_tests/tests.json
  15. 6
      vsprojects/vcxproj/grpc++/grpc++.vcxproj
  16. 18
      vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters
  17. 6
      vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj
  18. 18
      vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters
  19. 26
      vsprojects/vcxproj/test/grpc_rpc_manager_test/grpc_rpc_manager_test.vcxproj.filters
  20. 10
      vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj
  21. 26
      vsprojects/vcxproj/test/thread_manager_test/thread_manager_test.vcxproj.filters

@ -1270,9 +1270,9 @@ cc_library(
"src/cpp/server/secure_server_credentials.h",
"src/cpp/client/create_channel_internal.h",
"src/cpp/common/channel_filter.h",
"src/cpp/rpcmanager/grpc_rpc_manager.h",
"src/cpp/server/dynamic_thread_pool.h",
"src/cpp/server/thread_pool_interface.h",
"src/cpp/thread_manager/thread_manager.h",
"src/cpp/client/insecure_credentials.cc",
"src/cpp/client/secure_credentials.cc",
"src/cpp/common/auth_property_iterator.cc",
@ -1293,7 +1293,6 @@ cc_library(
"src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/rpcmanager/grpc_rpc_manager.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
@ -1302,6 +1301,7 @@ cc_library(
"src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/thread_manager/thread_manager.cc",
"src/cpp/util/byte_buffer_cc.cc",
"src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",
@ -1499,9 +1499,9 @@ cc_library(
srcs = [
"src/cpp/client/create_channel_internal.h",
"src/cpp/common/channel_filter.h",
"src/cpp/rpcmanager/grpc_rpc_manager.h",
"src/cpp/server/dynamic_thread_pool.h",
"src/cpp/server/thread_pool_interface.h",
"src/cpp/thread_manager/thread_manager.h",
"src/cpp/client/insecure_credentials.cc",
"src/cpp/common/insecure_create_auth_context.cc",
"src/cpp/server/insecure_server_credentials.cc",
@ -1517,7 +1517,6 @@ cc_library(
"src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/rpcmanager/grpc_rpc_manager.cc",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
@ -1526,6 +1525,7 @@ cc_library(
"src/cpp/server/server_context.cc",
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/thread_manager/thread_manager.cc",
"src/cpp/util/byte_buffer_cc.cc",
"src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",

@ -1025,7 +1025,6 @@ add_library(grpc++
src/cpp/common/completion_queue_cc.cc
src/cpp/common/core_codegen.cc
src/cpp/common/rpc_method.cc
src/cpp/rpcmanager/grpc_rpc_manager.cc
src/cpp/server/async_generic_service.cc
src/cpp/server/create_default_thread_pool.cc
src/cpp/server/dynamic_thread_pool.cc
@ -1034,6 +1033,7 @@ add_library(grpc++
src/cpp/server/server_context.cc
src/cpp/server/server_credentials.cc
src/cpp/server/server_posix.cc
src/cpp/thread_manager/thread_manager.cc
src/cpp/util/byte_buffer_cc.cc
src/cpp/util/slice_cc.cc
src/cpp/util/status.cc
@ -1280,7 +1280,6 @@ add_library(grpc++_unsecure
src/cpp/common/completion_queue_cc.cc
src/cpp/common/core_codegen.cc
src/cpp/common/rpc_method.cc
src/cpp/rpcmanager/grpc_rpc_manager.cc
src/cpp/server/async_generic_service.cc
src/cpp/server/create_default_thread_pool.cc
src/cpp/server/dynamic_thread_pool.cc
@ -1289,6 +1288,7 @@ add_library(grpc++_unsecure
src/cpp/server/server_context.cc
src/cpp/server/server_credentials.cc
src/cpp/server/server_posix.cc
src/cpp/thread_manager/thread_manager.cc
src/cpp/util/byte_buffer_cc.cc
src/cpp/util/slice_cc.cc
src/cpp/util/status.cc

@ -1050,7 +1050,6 @@ grpc_node_plugin: $(BINDIR)/$(CONFIG)/grpc_node_plugin
grpc_objective_c_plugin: $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin
grpc_php_plugin: $(BINDIR)/$(CONFIG)/grpc_php_plugin
grpc_python_plugin: $(BINDIR)/$(CONFIG)/grpc_python_plugin
grpc_rpc_manager_test: $(BINDIR)/$(CONFIG)/grpc_rpc_manager_test
grpc_ruby_plugin: $(BINDIR)/$(CONFIG)/grpc_ruby_plugin
grpc_tool_test: $(BINDIR)/$(CONFIG)/grpc_tool_test
grpclb_api_test: $(BINDIR)/$(CONFIG)/grpclb_api_test
@ -1078,6 +1077,7 @@ shutdown_test: $(BINDIR)/$(CONFIG)/shutdown_test
status_test: $(BINDIR)/$(CONFIG)/status_test
streaming_throughput_test: $(BINDIR)/$(CONFIG)/streaming_throughput_test
stress_test: $(BINDIR)/$(CONFIG)/stress_test
thread_manager_test: $(BINDIR)/$(CONFIG)/thread_manager_test
thread_stress_test: $(BINDIR)/$(CONFIG)/thread_stress_test
public_headers_must_be_c89: $(BINDIR)/$(CONFIG)/public_headers_must_be_c89
boringssl_aes_test: $(BINDIR)/$(CONFIG)/boringssl_aes_test
@ -1420,7 +1420,6 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/generic_end2end_test \
$(BINDIR)/$(CONFIG)/golden_file_test \
$(BINDIR)/$(CONFIG)/grpc_cli \
$(BINDIR)/$(CONFIG)/grpc_rpc_manager_test \
$(BINDIR)/$(CONFIG)/grpc_tool_test \
$(BINDIR)/$(CONFIG)/grpclb_api_test \
$(BINDIR)/$(CONFIG)/grpclb_test \
@ -1447,6 +1446,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/status_test \
$(BINDIR)/$(CONFIG)/streaming_throughput_test \
$(BINDIR)/$(CONFIG)/stress_test \
$(BINDIR)/$(CONFIG)/thread_manager_test \
$(BINDIR)/$(CONFIG)/thread_stress_test \
$(BINDIR)/$(CONFIG)/boringssl_aes_test \
$(BINDIR)/$(CONFIG)/boringssl_asn1_test \
@ -1508,7 +1508,6 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/generic_end2end_test \
$(BINDIR)/$(CONFIG)/golden_file_test \
$(BINDIR)/$(CONFIG)/grpc_cli \
$(BINDIR)/$(CONFIG)/grpc_rpc_manager_test \
$(BINDIR)/$(CONFIG)/grpc_tool_test \
$(BINDIR)/$(CONFIG)/grpclb_api_test \
$(BINDIR)/$(CONFIG)/grpclb_test \
@ -1535,6 +1534,7 @@ buildtests_cxx: privatelibs_cxx \
$(BINDIR)/$(CONFIG)/status_test \
$(BINDIR)/$(CONFIG)/streaming_throughput_test \
$(BINDIR)/$(CONFIG)/stress_test \
$(BINDIR)/$(CONFIG)/thread_manager_test \
$(BINDIR)/$(CONFIG)/thread_stress_test \
endif
@ -1809,8 +1809,6 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/generic_end2end_test || ( echo test generic_end2end_test failed ; exit 1 )
$(E) "[RUN] Testing golden_file_test"
$(Q) $(BINDIR)/$(CONFIG)/golden_file_test || ( echo test golden_file_test failed ; exit 1 )
$(E) "[RUN] Testing grpc_rpc_manager_test"
$(Q) $(BINDIR)/$(CONFIG)/grpc_rpc_manager_test || ( echo test grpc_rpc_manager_test failed ; exit 1 )
$(E) "[RUN] Testing grpc_tool_test"
$(Q) $(BINDIR)/$(CONFIG)/grpc_tool_test || ( echo test grpc_tool_test failed ; exit 1 )
$(E) "[RUN] Testing grpclb_api_test"
@ -1841,6 +1839,8 @@ test_cxx: buildtests_cxx
$(Q) $(BINDIR)/$(CONFIG)/status_test || ( echo test status_test failed ; exit 1 )
$(E) "[RUN] Testing streaming_throughput_test"
$(Q) $(BINDIR)/$(CONFIG)/streaming_throughput_test || ( echo test streaming_throughput_test failed ; exit 1 )
$(E) "[RUN] Testing thread_manager_test"
$(Q) $(BINDIR)/$(CONFIG)/thread_manager_test || ( echo test thread_manager_test failed ; exit 1 )
$(E) "[RUN] Testing thread_stress_test"
$(Q) $(BINDIR)/$(CONFIG)/thread_stress_test || ( echo test thread_stress_test failed ; exit 1 )
@ -3605,7 +3605,6 @@ LIBGRPC++_SRC = \
src/cpp/common/completion_queue_cc.cc \
src/cpp/common/core_codegen.cc \
src/cpp/common/rpc_method.cc \
src/cpp/rpcmanager/grpc_rpc_manager.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
@ -3614,6 +3613,7 @@ LIBGRPC++_SRC = \
src/cpp/server/server_context.cc \
src/cpp/server/server_credentials.cc \
src/cpp/server/server_posix.cc \
src/cpp/thread_manager/thread_manager.cc \
src/cpp/util/byte_buffer_cc.cc \
src/cpp/util/slice_cc.cc \
src/cpp/util/status.cc \
@ -4136,7 +4136,6 @@ LIBGRPC++_UNSECURE_SRC = \
src/cpp/common/completion_queue_cc.cc \
src/cpp/common/core_codegen.cc \
src/cpp/common/rpc_method.cc \
src/cpp/rpcmanager/grpc_rpc_manager.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
@ -4145,6 +4144,7 @@ LIBGRPC++_UNSECURE_SRC = \
src/cpp/server/server_context.cc \
src/cpp/server/server_credentials.cc \
src/cpp/server/server_posix.cc \
src/cpp/thread_manager/thread_manager.cc \
src/cpp/util/byte_buffer_cc.cc \
src/cpp/util/slice_cc.cc \
src/cpp/util/status.cc \
@ -11807,49 +11807,6 @@ ifneq ($(NO_DEPS),true)
endif
GRPC_RPC_MANAGER_TEST_SRC = \
test/cpp/rpcmanager/grpc_rpc_manager_test.cc \
GRPC_RPC_MANAGER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPC_RPC_MANAGER_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/grpc_rpc_manager_test: openssl_dep_error
else
ifeq ($(NO_PROTOBUF),true)
# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
$(BINDIR)/$(CONFIG)/grpc_rpc_manager_test: protobuf_dep_error
else
$(BINDIR)/$(CONFIG)/grpc_rpc_manager_test: $(PROTOBUF_DEP) $(GRPC_RPC_MANAGER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(GRPC_RPC_MANAGER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/grpc_rpc_manager_test
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/rpcmanager/grpc_rpc_manager_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
deps_grpc_rpc_manager_test: $(GRPC_RPC_MANAGER_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(GRPC_RPC_MANAGER_TEST_OBJS:.o=.dep)
endif
endif
GRPC_RUBY_PLUGIN_SRC = \
src/compiler/ruby_plugin.cc \
@ -13046,6 +13003,49 @@ $(OBJDIR)/$(CONFIG)/test/cpp/interop/stress_test.o: $(GENDIR)/src/proto/grpc/tes
$(OBJDIR)/$(CONFIG)/test/cpp/util/metrics_server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc
THREAD_MANAGER_TEST_SRC = \
test/cpp/thread_manager/thread_manager_test.cc \
THREAD_MANAGER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(THREAD_MANAGER_TEST_SRC))))
ifeq ($(NO_SECURE),true)
# You can't build secure targets if you don't have OpenSSL.
$(BINDIR)/$(CONFIG)/thread_manager_test: openssl_dep_error
else
ifeq ($(NO_PROTOBUF),true)
# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+.
$(BINDIR)/$(CONFIG)/thread_manager_test: protobuf_dep_error
else
$(BINDIR)/$(CONFIG)/thread_manager_test: $(PROTOBUF_DEP) $(THREAD_MANAGER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LDXX) $(LDFLAGS) $(THREAD_MANAGER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/thread_manager_test
endif
endif
$(OBJDIR)/$(CONFIG)/test/cpp/thread_manager/thread_manager_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a
deps_thread_manager_test: $(THREAD_MANAGER_TEST_OBJS:.o=.dep)
ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(THREAD_MANAGER_TEST_OBJS:.o=.dep)
endif
endif
THREAD_STRESS_TEST_SRC = \
test/cpp/end2end/thread_stress_test.cc \

@ -713,9 +713,9 @@ filegroups:
headers:
- src/cpp/client/create_channel_internal.h
- src/cpp/common/channel_filter.h
- src/cpp/rpcmanager/grpc_rpc_manager.h
- src/cpp/server/dynamic_thread_pool.h
- src/cpp/server/thread_pool_interface.h
- src/cpp/thread_manager/thread_manager.h
src:
- src/cpp/client/channel_cc.cc
- src/cpp/client/client_context.cc
@ -729,7 +729,6 @@ filegroups:
- src/cpp/common/completion_queue_cc.cc
- src/cpp/common/core_codegen.cc
- src/cpp/common/rpc_method.cc
- src/cpp/rpcmanager/grpc_rpc_manager.cc
- src/cpp/server/async_generic_service.cc
- src/cpp/server/create_default_thread_pool.cc
- src/cpp/server/dynamic_thread_pool.cc
@ -738,6 +737,7 @@ filegroups:
- src/cpp/server/server_context.cc
- src/cpp/server/server_credentials.cc
- src/cpp/server/server_posix.cc
- src/cpp/thread_manager/thread_manager.cc
- src/cpp/util/byte_buffer_cc.cc
- src/cpp/util/slice_cc.cc
- src/cpp/util/status.cc
@ -2895,18 +2895,6 @@ targets:
secure: false
vs_config_type: Application
vs_project_guid: '{DF52D501-A6CF-4E6F-BA38-6EBE2E8DAFB2}'
- name: grpc_rpc_manager_test
build: test
language: c++
headers:
- test/cpp/rpcmanager/grpc_rpc_manager_test.h
src:
- test/cpp/rpcmanager/grpc_rpc_manager_test.cc
deps:
- grpc++
- grpc
- gpr
- grpc++_test_config
- name: grpc_ruby_plugin
build: protoc
language: c++
@ -3337,6 +3325,18 @@ targets:
- gpr_test_util
- gpr
- grpc++_test_config
- name: thread_manager_test
build: test
language: c++
headers:
- test/cpp/thread_manager/thread_manager_test.h
src:
- test/cpp/thread_manager/thread_manager_test.cc
deps:
- grpc++
- grpc
- gpr
- grpc++_test_config
- name: thread_stress_test
gtest: true
cpu_cost: 100

@ -107,11 +107,11 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
class AsyncRequest;
class ShutdownRequest;
/// SyncRequestManager is an implementation of GrpcRpcManager. This class is
/// responsible for polling for incoming RPCs and calling the RPC handlers.
/// SyncRequestThreadManager is an implementation of ThreadManager. This class
/// is responsible for polling for incoming RPCs and calling the RPC handlers.
/// This is only used in case of a Sync server (i.e a server exposing a sync
/// interface)
class SyncRequestManager;
class SyncRequestThreadManager;
class UnimplementedAsyncRequestContext;
class UnimplementedAsyncRequest;
@ -196,8 +196,8 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
std::shared_ptr<std::vector<std::unique_ptr<ServerCompletionQueue>>>
sync_server_cqs_;
/// List of GrpcRpcManager instances (one for each cq in the sync_server_cqs)
std::vector<std::unique_ptr<SyncRequestManager>> sync_req_mgrs_;
/// List of ThreadManager instances (one for each cq in the sync_server_cqs)
std::vector<std::unique_ptr<SyncRequestThreadManager>> sync_req_mgrs_;
// Sever status
grpc::mutex mu_;
@ -205,11 +205,6 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen {
bool shutdown_;
bool shutdown_notified_;
// TODO (sreek) : Remove num_running_cb_ and callback_cv_;
// The number of threads which are running callbacks.
// int num_running_cb_;
// grpc::condition_variable callback_cv_;
grpc::condition_variable shutdown_cv_;
std::shared_ptr<GlobalCallbacks> global_callbacks_;

@ -247,7 +247,7 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() {
// server
// 2. cqs_: Completion queues added via AddCompletionQueue() call
// All sync cqs (if any) are frequently polled by the GrpcRpcManager
// All sync cqs (if any) are frequently polled by ThreadManager
int num_frequently_polled_cqs = sync_server_cqs->size();
for (auto it = sync_server_cqs->begin(); it != sync_server_cqs->end(); ++it) {

@ -242,12 +242,16 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag {
grpc_completion_queue* cq_;
};
class Server::SyncRequestManager : public GrpcRpcManager {
// Implementation of ThreadManager. Each instance of SyncRequestThreadManager
// manages a pool of threads that poll for incoming Sync RPCs and call the
// appropriate RPC handlers
class Server::SyncRequestThreadManager : public ThreadManager {
public:
SyncRequestManager(Server* server, CompletionQueue* server_cq,
std::shared_ptr<GlobalCallbacks> global_callbacks,
int min_pollers, int max_pollers, int cq_timeout_msec)
: GrpcRpcManager(min_pollers, max_pollers),
SyncRequestThreadManager(Server* server, CompletionQueue* server_cq,
std::shared_ptr<GlobalCallbacks> global_callbacks,
int min_pollers, int max_pollers,
int cq_timeout_msec)
: ThreadManager(min_pollers, max_pollers),
server_(server),
server_cq_(server_cq),
cq_timeout_msec_(cq_timeout_msec),
@ -333,7 +337,7 @@ class Server::SyncRequestManager : public GrpcRpcManager {
m->Request(server_->c_server(), server_cq_->cq());
}
GrpcRpcManager::Initialize();
ThreadManager::Initialize();
}
}
@ -367,9 +371,9 @@ Server::Server(
for (auto it = sync_server_cqs_->begin(); it != sync_server_cqs_->end();
it++) {
sync_req_mgrs_.emplace_back(
new SyncRequestManager(this, (*it).get(), global_callbacks_,
min_pollers, max_pollers, sync_cq_timeout_msec));
sync_req_mgrs_.emplace_back(new SyncRequestThreadManager(
this, (*it).get(), global_callbacks_, min_pollers, max_pollers,
sync_cq_timeout_msec));
}
grpc_channel_args channel_args;
@ -509,10 +513,10 @@ void Server::ShutdownInternal(gpr_timespec deadline) {
ShutdownTag shutdown_tag; // Dummy shutdown tag
grpc_server_shutdown_and_notify(server_, shutdown_cq.cq(), &shutdown_tag);
// Shutdown all RpcManagers. This will try to gracefully stop all the
// threads in the RpcManagers (once they process any inflight requests)
// Shutdown all ThreadManagers. This will try to gracefully stop all the
// threads in the ThreadManagers (once they process any inflight requests)
for (auto it = sync_req_mgrs_.begin(); it != sync_req_mgrs_.end(); it++) {
(*it)->ShutdownRpcManager();
(*it)->Shutdown();
}
shutdown_cq.Shutdown();
@ -530,7 +534,7 @@ void Server::ShutdownInternal(gpr_timespec deadline) {
// Else in case of SHUTDOWN or GOT_EVENT, it means that the server has
// successfully shutdown
// Wait for threads in all RpcManagers to terminate
// Wait for threads in all ThreadManagers to terminate
for (auto it = sync_req_mgrs_.begin(); it != sync_req_mgrs_.end(); it++) {
(*it)->Wait();
(*it)->ShutdownAndDrainCompletionQueue();

@ -40,29 +40,28 @@
namespace grpc {
GrpcRpcManager::GrpcRpcManagerThread::GrpcRpcManagerThread(
GrpcRpcManager* rpc_mgr)
: rpc_mgr_(rpc_mgr),
thd_(new std::thread(&GrpcRpcManager::GrpcRpcManagerThread::Run, this)) {}
void GrpcRpcManager::GrpcRpcManagerThread::Run() {
rpc_mgr_->MainWorkLoop();
rpc_mgr_->MarkAsCompleted(this);
ThreadManager::WorkerThread::WorkerThread(ThreadManager* thd_mgr)
: thd_mgr_(thd_mgr),
thd_(new std::thread(&ThreadManager::WorkerThread::Run, this)) {}
void ThreadManager::WorkerThread::Run() {
thd_mgr_->MainWorkLoop();
thd_mgr_->MarkAsCompleted(this);
}
GrpcRpcManager::GrpcRpcManagerThread::~GrpcRpcManagerThread() {
ThreadManager::WorkerThread::~WorkerThread() {
thd_->join();
thd_.reset();
}
GrpcRpcManager::GrpcRpcManager(int min_pollers, int max_pollers)
ThreadManager::ThreadManager(int min_pollers, int max_pollers)
: shutdown_(false),
num_pollers_(0),
min_pollers_(min_pollers),
max_pollers_(max_pollers == -1 ? INT_MAX : max_pollers),
num_threads_(0) {}
GrpcRpcManager::~GrpcRpcManager() {
ThreadManager::~ThreadManager() {
{
std::unique_lock<grpc::mutex> lock(mu_);
GPR_ASSERT(num_threads_ == 0);
@ -71,24 +70,24 @@ GrpcRpcManager::~GrpcRpcManager() {
CleanupCompletedThreads();
}
void GrpcRpcManager::Wait() {
void ThreadManager::Wait() {
std::unique_lock<grpc::mutex> lock(mu_);
while (num_threads_ != 0) {
shutdown_cv_.wait(lock);
}
}
void GrpcRpcManager::ShutdownRpcManager() {
void ThreadManager::Shutdown() {
std::unique_lock<grpc::mutex> lock(mu_);
shutdown_ = true;
}
bool GrpcRpcManager::IsShutdown() {
bool ThreadManager::IsShutdown() {
std::unique_lock<grpc::mutex> lock(mu_);
return shutdown_;
}
void GrpcRpcManager::MarkAsCompleted(GrpcRpcManagerThread* thd) {
void ThreadManager::MarkAsCompleted(WorkerThread* thd) {
{
std::unique_lock<grpc::mutex> list_lock(list_mu_);
completed_threads_.push_back(thd);
@ -101,7 +100,7 @@ void GrpcRpcManager::MarkAsCompleted(GrpcRpcManagerThread* thd) {
}
}
void GrpcRpcManager::CleanupCompletedThreads() {
void ThreadManager::CleanupCompletedThreads() {
std::unique_lock<grpc::mutex> lock(list_mu_);
for (auto thd = completed_threads_.begin(); thd != completed_threads_.end();
thd = completed_threads_.erase(thd)) {
@ -109,7 +108,7 @@ void GrpcRpcManager::CleanupCompletedThreads() {
}
}
void GrpcRpcManager::Initialize() {
void ThreadManager::Initialize() {
for (int i = 0; i < min_pollers_; i++) {
MaybeCreatePoller();
}
@ -118,7 +117,7 @@ void GrpcRpcManager::Initialize() {
// If the number of pollers (i.e threads currently blocked in PollForWork()) is
// less than max threshold (i.e max_pollers_) and the total number of threads is
// below the maximum threshold, we can let the current thread continue as poller
bool GrpcRpcManager::MaybeContinueAsPoller() {
bool ThreadManager::MaybeContinueAsPoller() {
std::unique_lock<grpc::mutex> lock(mu_);
if (shutdown_ || num_pollers_ > max_pollers_) {
return false;
@ -131,18 +130,18 @@ bool GrpcRpcManager::MaybeContinueAsPoller() {
// Create a new poller if the current number of pollers i.e num_pollers_ (i.e
// threads currently blocked in PollForWork()) is below the threshold (i.e
// min_pollers_) and the total number of threads is below the maximum threshold
void GrpcRpcManager::MaybeCreatePoller() {
void ThreadManager::MaybeCreatePoller() {
grpc::unique_lock<grpc::mutex> lock(mu_);
if (!shutdown_ && num_pollers_ < min_pollers_) {
num_pollers_++;
num_threads_++;
// Create a new thread (which ends up calling the MainWorkLoop() function
new GrpcRpcManagerThread(this);
new WorkerThread(this);
}
}
void GrpcRpcManager::MainWorkLoop() {
void ThreadManager::MainWorkLoop() {
void* tag;
bool ok;
@ -170,7 +169,7 @@ void GrpcRpcManager::MainWorkLoop() {
}
// Note that MaybeCreatePoller does check for shutdown and creates a new
// thread only if GrpcRpcManager is not shutdown
// thread only if ThreadManager is not shutdown
if (work_status == WORK_FOUND) {
MaybeCreatePoller();
DoWork(tag, ok);
@ -179,7 +178,7 @@ void GrpcRpcManager::MainWorkLoop() {
CleanupCompletedThreads();
// If we are here, either GrpcRpcManager is shutting down or it already has
// If we are here, either ThreadManager is shutting down or it already has
// enough threads.
}

@ -31,8 +31,8 @@
*
*/
#ifndef GRPC_INTERNAL_CPP_GRPC_RPC_MANAGER_H
#define GRPC_INTERNAL_CPP_GRPC_RPC_MANAGER_H
#ifndef GRPC_INTERNAL_CPP_THREAD_MANAGER_H
#define GRPC_INTERNAL_CPP_THREAD_MANAGER_H
#include <list>
#include <memory>
@ -42,10 +42,10 @@
namespace grpc {
class GrpcRpcManager {
class ThreadManager {
public:
explicit GrpcRpcManager(int min_pollers, int max_pollers);
virtual ~GrpcRpcManager();
explicit ThreadManager(int min_pollers, int max_pollers);
virtual ~ThreadManager();
// Initializes and Starts the Rpc Manager threads
void Initialize();
@ -60,17 +60,17 @@ class GrpcRpcManager {
// - The implementaion MUST set the value of 'ok' to 'true' or 'false'. A
// value of 'false' indicates some implemenation specific error (that is
// neither SHUTDOWN nor TIMEOUT)
// - GrpcRpcManager does not interpret the values of 'tag' and 'ok'
// - GrpcRpcManager WILL call DoWork() and pass '*tag' and 'ok' as input to
// - ThreadManager does not interpret the values of 'tag' and 'ok'
// - ThreadManager WILL call DoWork() and pass '*tag' and 'ok' as input to
// DoWork()
//
// If the return value is SHUTDOWN:,
// - GrpcManager WILL NOT call DoWork() and terminates the thead
// - ThreadManager WILL NOT call DoWork() and terminates the thead
//
// If the return value is TIMEOUT:,
// - GrpcManager WILL NOT call DoWork()
// - GrpcManager MAY terminate the thread depending on the current number of
// active poller threads and mix_pollers/max_pollers settings
// - ThreadManager WILL NOT call DoWork()
// - ThreadManager MAY terminate the thread depending on the current number
// of active poller threads and mix_pollers/max_pollers settings
// - Also, the value of timeout is specific to the derived class
// implementation
virtual WorkStatus PollForWork(void** tag, bool* ok) = 0;
@ -84,40 +84,40 @@ class GrpcRpcManager {
// actually finds some work
virtual void DoWork(void* tag, bool ok) = 0;
// Mark the GrpcRpcManager as shutdown and begin draining the work.
// This is a non-blocking call and the caller should call Wait(), a blocking
// call which returns only once the shutdown is complete
void ShutdownRpcManager();
// Mark the ThreadManager as shutdown and begin draining the work. This is a
// non-blocking call and the caller should call Wait(), a blocking call which
// returns only once the shutdown is complete
void Shutdown();
// Has ShutdownRpcManager() been called
// Has Shutdown() been called
bool IsShutdown();
// A blocking call that returns only after the GrpcRpcManager has shutdown and
// A blocking call that returns only after the ThreadManager has shutdown and
// all the threads have drained all the outstanding work
void Wait();
private:
// Helper wrapper class around std::thread. This takes a GrpcRpcManager object
// Helper wrapper class around std::thread. This takes a ThreadManager object
// and starts a new std::thread to calls the Run() function.
//
// The Run() function calls GrpcManager::MainWorkLoop() function and once that
// completes, it marks the GrpcRpcManagerThread completed by calling
// GrpcRpcManager::MarkAsCompleted()
class GrpcRpcManagerThread {
// The Run() function calls ThreadManager::MainWorkLoop() function and once
// that completes, it marks the WorkerThread completed by calling
// ThreadManager::MarkAsCompleted()
class WorkerThread {
public:
GrpcRpcManagerThread(GrpcRpcManager* rpc_mgr);
~GrpcRpcManagerThread();
WorkerThread(ThreadManager* thd_mgr);
~WorkerThread();
private:
// Calls rpc_mgr_->MainWorkLoop() and once that completes, calls
// rpc_mgr_>MarkAsCompleted(this) to mark the thread as completed
// Calls thd_mgr_->MainWorkLoop() and once that completes, calls
// thd_mgr_>MarkAsCompleted(this) to mark the thread as completed
void Run();
GrpcRpcManager* rpc_mgr_;
ThreadManager* thd_mgr_;
std::unique_ptr<grpc::thread> thd_;
};
// The main funtion in GrpcRpcManager
// The main funtion in ThreadManager
void MainWorkLoop();
// Create a new poller if the number of current pollers is less than the
@ -128,7 +128,7 @@ class GrpcRpcManager {
// current number of pollers is less than the max_pollers.
bool MaybeContinueAsPoller();
void MarkAsCompleted(GrpcRpcManagerThread* thd);
void MarkAsCompleted(WorkerThread* thd);
void CleanupCompletedThreads();
// Protects shutdown_, num_pollers_ and num_threads_
@ -150,9 +150,9 @@ class GrpcRpcManager {
int num_threads_;
grpc::mutex list_mu_;
std::list<GrpcRpcManagerThread*> completed_threads_;
std::list<WorkerThread*> completed_threads_;
};
} // namespace grpc
#endif // GRPC_INTERNAL_CPP_GRPC_RPC_MANAGER_H
#endif // GRPC_INTERNAL_CPP_THREAD_MANAGER_H

@ -42,7 +42,7 @@
#include "test/cpp/rpcmanager/grpc_rpc_manager_test.h"
#include "test/cpp/util/test_config.h"
using grpc::testing::GrpcRpcManagerTest;
using grpc::testing::ThreadManagerTest;
static const int kMinPollers = 2;
static const int kMaxPollers = 10;
@ -52,8 +52,8 @@ static const int kDoWorkDurationMsec = 1;
static const int kNumDoWorkIterations = 10;
grpc::GrpcRpcManager::WorkStatus GrpcRpcManagerTest::PollForWork(void **tag,
bool *ok) {
grpc::ThreadManager::WorkStatus ThreadManagerTest::PollForWork(void **tag,
bool *ok) {
{
std::unique_lock<grpc::mutex> lock(mu_);
gpr_log(GPR_INFO, "PollForWork: Entered");
@ -72,14 +72,14 @@ grpc::GrpcRpcManager::WorkStatus GrpcRpcManagerTest::PollForWork(void **tag,
if (num_calls_ > kNumDoWorkIterations) {
gpr_log(GPR_DEBUG, "PollForWork: Returning shutdown");
work_status = SHUTDOWN;
ShutdownRpcManager();
ThreadManager::Shutdown();
}
}
return work_status;
}
void GrpcRpcManagerTest::DoWork(void *tag, bool ok) {
void ThreadManagerTest::DoWork(void *tag, bool ok) {
{
std::unique_lock<grpc::mutex> lock(mu_);
gpr_log(GPR_DEBUG, "DoWork()");
@ -91,7 +91,7 @@ void GrpcRpcManagerTest::DoWork(void *tag, bool ok) {
int main(int argc, char **argv) {
grpc::testing::InitTest(&argc, &argv, true);
GrpcRpcManagerTest test_rpc_manager(kMinPollers, kMaxPollers);
ThreadManagerTest test_rpc_manager(kMinPollers, kMaxPollers);
test_rpc_manager.Initialize();
test_rpc_manager.Wait();

@ -30,21 +30,21 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*is % allowed in string
*/
#ifndef GRPC_TEST_CPP_GRPC_RPC_MANAGER_TEST_H
#define GRPC_TEST_CPP_GRPC_RPC_MANAGER_TEST_H
#ifndef GRPC_TEST_CPP_THREAD_MANAGER_TEST_H
#define GRPC_TEST_CPP_THREAD_MANAGER_TEST_H
#include "src/cpp/rpcmanager/grpc_rpc_manager.h"
namespace grpc {
namespace testing {
class GrpcRpcManagerTest GRPC_FINAL : public GrpcRpcManager {
class ThreadManagerTest GRPC_FINAL : public ThreadManager {
public:
GrpcRpcManagerTest(int min_pollers, int max_pollers)
: GrpcRpcManager(min_pollers, max_pollers), num_calls_(0){};
ThreadManagerTest(int min_pollers, int max_pollers)
: ThreadManager(min_pollers, max_pollers), num_calls_(0){};
grpc::GrpcRpcManager::WorkStatus PollForWork(void **tag,
bool *ok) GRPC_OVERRIDE;
grpc::ThreadManager::WorkStatus PollForWork(void **tag,
bool *ok) GRPC_OVERRIDE;
void DoWork(void *tag, bool ok) GRPC_OVERRIDE;
private:
@ -55,4 +55,4 @@ class GrpcRpcManagerTest GRPC_FINAL : public GrpcRpcManager {
} // namespace testing
} // namespace grpc
#endif // GRPC_TEST_CPP_GRPC_RPC_MANAGER_TEST_H
#endif // GRPC_TEST_CPP_THREAD_MANAGER_TEST_H

@ -861,9 +861,9 @@ src/cpp/common/secure_auth_context.h \
src/cpp/server/secure_server_credentials.h \
src/cpp/client/create_channel_internal.h \
src/cpp/common/channel_filter.h \
src/cpp/rpcmanager/grpc_rpc_manager.h \
src/cpp/server/dynamic_thread_pool.h \
src/cpp/server/thread_pool_interface.h \
src/cpp/thread_manager/thread_manager.h \
src/cpp/client/insecure_credentials.cc \
src/cpp/client/secure_credentials.cc \
src/cpp/common/auth_property_iterator.cc \
@ -884,7 +884,6 @@ src/cpp/common/channel_filter.cc \
src/cpp/common/completion_queue_cc.cc \
src/cpp/common/core_codegen.cc \
src/cpp/common/rpc_method.cc \
src/cpp/rpcmanager/grpc_rpc_manager.cc \
src/cpp/server/async_generic_service.cc \
src/cpp/server/create_default_thread_pool.cc \
src/cpp/server/dynamic_thread_pool.cc \
@ -893,6 +892,7 @@ src/cpp/server/server_cc.cc \
src/cpp/server/server_context.cc \
src/cpp/server/server_credentials.cc \
src/cpp/server/server_posix.cc \
src/cpp/thread_manager/thread_manager.cc \
src/cpp/util/byte_buffer_cc.cc \
src/cpp/util/slice_cc.cc \
src/cpp/util/status.cc \

@ -2527,26 +2527,6 @@
"third_party": false,
"type": "target"
},
{
"deps": [
"gpr",
"grpc",
"grpc++",
"grpc++_test_config"
],
"headers": [
"test/cpp/rpcmanager/grpc_rpc_manager_test.h"
],
"is_filegroup": false,
"language": "c++",
"name": "grpc_rpc_manager_test",
"src": [
"test/cpp/rpcmanager/grpc_rpc_manager_test.cc",
"test/cpp/rpcmanager/grpc_rpc_manager_test.h"
],
"third_party": false,
"type": "target"
},
{
"deps": [
"grpc_plugin_support"
@ -3131,6 +3111,26 @@
"third_party": false,
"type": "target"
},
{
"deps": [
"gpr",
"grpc",
"grpc++",
"grpc++_test_config"
],
"headers": [
"test/cpp/thread_manager/thread_manager_test.h"
],
"is_filegroup": false,
"language": "c++",
"name": "thread_manager_test",
"src": [
"test/cpp/thread_manager/thread_manager_test.cc",
"test/cpp/thread_manager/thread_manager_test.h"
],
"third_party": false,
"type": "target"
},
{
"deps": [
"gpr",
@ -7269,9 +7269,9 @@
"include/grpc++/support/time.h",
"src/cpp/client/create_channel_internal.h",
"src/cpp/common/channel_filter.h",
"src/cpp/rpcmanager/grpc_rpc_manager.h",
"src/cpp/server/dynamic_thread_pool.h",
"src/cpp/server/thread_pool_interface.h"
"src/cpp/server/thread_pool_interface.h",
"src/cpp/thread_manager/thread_manager.h"
],
"is_filegroup": true,
"language": "c++",
@ -7338,8 +7338,6 @@
"src/cpp/common/completion_queue_cc.cc",
"src/cpp/common/core_codegen.cc",
"src/cpp/common/rpc_method.cc",
"src/cpp/rpcmanager/grpc_rpc_manager.cc",
"src/cpp/rpcmanager/grpc_rpc_manager.h",
"src/cpp/server/async_generic_service.cc",
"src/cpp/server/create_default_thread_pool.cc",
"src/cpp/server/dynamic_thread_pool.cc",
@ -7350,6 +7348,8 @@
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/server/thread_pool_interface.h",
"src/cpp/thread_manager/thread_manager.cc",
"src/cpp/thread_manager/thread_manager.h",
"src/cpp/util/byte_buffer_cc.cc",
"src/cpp/util/slice_cc.cc",
"src/cpp/util/status.cc",

@ -2416,27 +2416,6 @@
"windows"
]
},
{
"args": [],
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
"gtest": false,
"language": "c++",
"name": "grpc_rpc_manager_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
]
},
{
"args": [],
"ci_platforms": [
@ -2742,6 +2721,27 @@
"posix"
]
},
{
"args": [],
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"flaky": false,
"gtest": false,
"language": "c++",
"name": "thread_manager_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
]
},
{
"args": [],
"ci_platforms": [
@ -31563,27 +31563,6 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_secure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": 8,
"defaults": "boringssl",
"exclude_configs": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_secure",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",
@ -31815,27 +31794,6 @@
"shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",
"{\"scenarios\": [{\"name\": \"cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 0, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}]}"
],
"boringssl": true,
"ci_platforms": [
"linux"
],
"cpu_cost": 8,
"defaults": "boringssl",
"exclude_configs": [],
"flaky": false,
"language": "c++",
"name": "json_run_localhost",
"platforms": [
"linux"
],
"shortname": "json_run_localhost:cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_insecure",
"timeout_seconds": 180
},
{
"args": [
"--scenarios_json",

@ -361,9 +361,9 @@
<ClInclude Include="$(SolutionDir)\..\src\cpp\server\secure_server_credentials.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\common\channel_filter.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\rpcmanager\grpc_rpc_manager.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\server\thread_pool_interface.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
@ -406,8 +406,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\rpcmanager\grpc_rpc_manager.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\create_default_thread_pool.cc">
@ -424,6 +422,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice_cc.cc">

@ -61,9 +61,6 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\rpcmanager\grpc_rpc_manager.cc">
<Filter>src\cpp\rpcmanager</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
@ -88,6 +85,9 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.cc">
<Filter>src\cpp\thread_manager</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
@ -413,15 +413,15 @@
<ClInclude Include="$(SolutionDir)\..\src\cpp\common\channel_filter.h">
<Filter>src\cpp\common</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\cpp\rpcmanager\grpc_rpc_manager.h">
<Filter>src\cpp\rpcmanager</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.h">
<Filter>src\cpp\server</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\cpp\server\thread_pool_interface.h">
<Filter>src\cpp\server</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.h">
<Filter>src\cpp\thread_manager</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
@ -473,12 +473,12 @@
<Filter Include="src\cpp\common">
<UniqueIdentifier>{2336e396-7e0b-8bf9-3b09-adc6ad1f0e5b}</UniqueIdentifier>
</Filter>
<Filter Include="src\cpp\rpcmanager">
<UniqueIdentifier>{f142b1a2-5198-040b-9da4-2afc09e9248a}</UniqueIdentifier>
</Filter>
<Filter Include="src\cpp\server">
<UniqueIdentifier>{321b0980-74ad-e8ca-f23b-deffa5d6bb8f}</UniqueIdentifier>
</Filter>
<Filter Include="src\cpp\thread_manager">
<UniqueIdentifier>{23f9df56-8604-52a0-e6a2-f01b8e68d0e7}</UniqueIdentifier>
</Filter>
<Filter Include="src\cpp\util">
<UniqueIdentifier>{f842537a-2bf1-1ec3-b495-7d62c64a1c06}</UniqueIdentifier>
</Filter>

@ -357,9 +357,9 @@
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\src\cpp\client\create_channel_internal.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\common\channel_filter.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\rpcmanager\grpc_rpc_manager.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\server\thread_pool_interface.h" />
<ClInclude Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\src\cpp\client\insecure_credentials.cc">
@ -392,8 +392,6 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\rpcmanager\grpc_rpc_manager.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\create_default_thread_pool.cc">
@ -410,6 +408,8 @@
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\slice_cc.cc">

@ -46,9 +46,6 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\common\rpc_method.cc">
<Filter>src\cpp\common</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\rpcmanager\grpc_rpc_manager.cc">
<Filter>src\cpp\rpcmanager</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\async_generic_service.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
@ -73,6 +70,9 @@
<ClCompile Include="$(SolutionDir)\..\src\cpp\server\server_posix.cc">
<Filter>src\cpp\server</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.cc">
<Filter>src\cpp\thread_manager</Filter>
</ClCompile>
<ClCompile Include="$(SolutionDir)\..\src\cpp\util\byte_buffer_cc.cc">
<Filter>src\cpp\util</Filter>
</ClCompile>
@ -386,15 +386,15 @@
<ClInclude Include="$(SolutionDir)\..\src\cpp\common\channel_filter.h">
<Filter>src\cpp\common</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\cpp\rpcmanager\grpc_rpc_manager.h">
<Filter>src\cpp\rpcmanager</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\cpp\server\dynamic_thread_pool.h">
<Filter>src\cpp\server</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\cpp\server\thread_pool_interface.h">
<Filter>src\cpp\server</Filter>
</ClInclude>
<ClInclude Include="$(SolutionDir)\..\src\cpp\thread_manager\thread_manager.h">
<Filter>src\cpp\thread_manager</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
@ -446,12 +446,12 @@
<Filter Include="src\cpp\common">
<UniqueIdentifier>{ed8e4daa-825f-fbe5-2a45-846ad9165d3d}</UniqueIdentifier>
</Filter>
<Filter Include="src\cpp\rpcmanager">
<UniqueIdentifier>{cb26a5cb-4725-6fee-8abc-09d5fcd52f39}</UniqueIdentifier>
</Filter>
<Filter Include="src\cpp\server">
<UniqueIdentifier>{8a54a279-d14b-4237-0df3-1ffe1ef5a7af}</UniqueIdentifier>
</Filter>
<Filter Include="src\cpp\thread_manager">
<UniqueIdentifier>{e5b55f25-d99f-b8e5-9981-7da7fa7ba628}</UniqueIdentifier>
</Filter>
<Filter Include="src\cpp\util">
<UniqueIdentifier>{fb5d9a64-20ca-5119-ed38-04a3cf94923d}</UniqueIdentifier>
</Filter>

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\cpp\rpcmanager\grpc_rpc_manager_test.cc">
<Filter>test\cpp\rpcmanager</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\test\cpp\rpcmanager\grpc_rpc_manager_test.h">
<Filter>test\cpp\rpcmanager</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="test">
<UniqueIdentifier>{9da529f7-8064-34c0-54da-0fade27184ad}</UniqueIdentifier>
</Filter>
<Filter Include="test\cpp">
<UniqueIdentifier>{b6e53cff-22ab-1194-866d-57caa3551fd2}</UniqueIdentifier>
</Filter>
<Filter Include="test\cpp\rpcmanager">
<UniqueIdentifier>{c63d7236-e7c6-d7b7-e3d8-f25853e358e6}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

@ -20,7 +20,7 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{A4F24E89-1766-2FAA-9058-1094EAA018A8}</ProjectGuid>
<ProjectGuid>{08C611E4-7F87-73BE-76CE-C158A4CC05A3}</ProjectGuid>
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected>
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir>
</PropertyGroup>
@ -62,14 +62,14 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<TargetName>grpc_rpc_manager_test</TargetName>
<TargetName>thread_manager_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib>
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TargetName>grpc_rpc_manager_test</TargetName>
<TargetName>thread_manager_test</TargetName>
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib>
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib>
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl>
@ -160,10 +160,10 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\test\cpp\rpcmanager\grpc_rpc_manager_test.h" />
<ClInclude Include="$(SolutionDir)\..\test\cpp\thread_manager\thread_manager_test.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\cpp\rpcmanager\grpc_rpc_manager_test.cc">
<ClCompile Include="$(SolutionDir)\..\test\cpp\thread_manager\thread_manager_test.cc">
</ClCompile>
</ItemGroup>
<ItemGroup>

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="$(SolutionDir)\..\test\cpp\thread_manager\thread_manager_test.cc">
<Filter>test\cpp\thread_manager</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="$(SolutionDir)\..\test\cpp\thread_manager\thread_manager_test.h">
<Filter>test\cpp\thread_manager</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="test">
<UniqueIdentifier>{e9e471cd-7f7e-9abc-af13-ec58851849ac}</UniqueIdentifier>
</Filter>
<Filter Include="test\cpp">
<UniqueIdentifier>{b350f72c-af76-7272-4342-1b0fc7a458ee}</UniqueIdentifier>
</Filter>
<Filter Include="test\cpp\thread_manager">
<UniqueIdentifier>{6b09ea8d-fbc6-e6fe-f884-b3d3dfcbfc12}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>
Loading…
Cancel
Save