diff --git a/src/margo.c b/src/margo.c index 32b937157c4772e9c41c508204743d56ec662dc0..e5e2e2ca5c163ffa6d43de5cf6d6423468557247 100644 --- a/src/margo.c +++ b/src/margo.c @@ -174,37 +174,34 @@ margo_instance_id margo_init(const char *addr_str, int mode, if (ret != ABT_SUCCESS) goto err; } - if (mode == MARGO_SERVER_MODE) + if (rpc_thread_count > 0) { - if (rpc_thread_count > 0) - { - rpc_xstreams = calloc(rpc_thread_count, sizeof(*rpc_xstreams)); - if (rpc_xstreams == NULL) goto err; + rpc_xstreams = calloc(rpc_thread_count, sizeof(*rpc_xstreams)); + if (rpc_xstreams == NULL) goto err; #ifdef HAVE_ABT_SNOOZER - ret = ABT_snoozer_xstream_create(rpc_thread_count, &rpc_pool, - rpc_xstreams); - if (ret != ABT_SUCCESS) goto err; + ret = ABT_snoozer_xstream_create(rpc_thread_count, &rpc_pool, + rpc_xstreams); + if (ret != ABT_SUCCESS) goto err; #else - int j; - ret = ABT_pool_create_basic(ABT_POOL_FIFO, ABT_POOL_ACCESS_MPMC, ABT_TRUE, &rpc_pool); - if (ret != ABT_SUCCESS) goto err; - for(j=0; jhandle_cache_mtx)); + ABT_mutex_create(&(mid->handle_cache_mtx)); for(i = 0; i < DEFAULT_MERCURY_HANDLE_CACHE_SIZE; i++) {