Provide a simple configurable limit on the number of threads.
[bluesky.git] / bluesky / store-kv.cc
index de16832..1318126 100644 (file)
@@ -75,7 +75,8 @@ static gpointer kvstore_new(const gchar *path)
 
     static volatile gsize once = 0;
     if (g_once_init_enter(&once)) {
-        thread_pool = g_thread_pool_new(kvstore_task, NULL, -1, FALSE, NULL);
+        thread_pool = g_thread_pool_new(kvstore_task, NULL,
+                                        bluesky_max_threads, FALSE, NULL);
         g_once_init_leave(&once, 1);
     }