Provide a simple configurable limit on the number of threads.
[bluesky.git] / nfs3 / rpc.c
index e1cb4d1..76de1cd 100644 (file)
@@ -508,7 +508,8 @@ static async_rpc_init()
     main_context = g_main_context_new();
     main_loop = g_main_loop_new(main_context, FALSE);
 
-    rpc_thread_pool = g_thread_pool_new(async_rpc_task, NULL, -1, FALSE, NULL);
+    rpc_thread_pool = g_thread_pool_new(async_rpc_task, NULL,
+                                        bluesky_max_threads, FALSE, NULL);
 
     /* Arrange to have the cache writeback code run every five seconds. */
     GSource *source = g_timeout_source_new_seconds(5);