1
0
mirror of https://github.com/haiwen/ccnet-server.git synced 2025-09-25 20:32:57 +00:00

Merge pull request #37 from haiwen/add_named_pipe_server_thread_pool

Add named pipe server thread pool.
This commit is contained in:
Jiaqiang Xu
2019-09-11 15:25:30 +08:00
committed by GitHub

View File

@@ -39,6 +39,8 @@ extern CcnetSession *session;
#define CCNET_SOCKET_NAME "ccnet-rpc.sock" #define CCNET_SOCKET_NAME "ccnet-rpc.sock"
#define NAMED_PIPE_SERVER_THREAD_POOL_SIZE 50
int int
ccnet_start_rpc(CcnetSession *session) ccnet_start_rpc(CcnetSession *session)
{ {
@@ -313,7 +315,7 @@ ccnet_start_rpc(CcnetSession *session)
#endif /* CCNET_SERVER */ #endif /* CCNET_SERVER */
char *path = g_build_filename (session->config_dir, CCNET_SOCKET_NAME, NULL); char *path = g_build_filename (session->config_dir, CCNET_SOCKET_NAME, NULL);
SearpcNamedPipeServer *server = searpc_create_named_pipe_server (path); SearpcNamedPipeServer *server = searpc_create_named_pipe_server (path, NAMED_PIPE_SERVER_THREAD_POOL_SIZE);
if (!server) { if (!server) {
ccnet_warning ("Failed to create named pipe server.\n"); ccnet_warning ("Failed to create named pipe server.\n");
g_free (path); g_free (path);