Provide a simple configurable limit on the number of threads.
[bluesky.git] / bluesky / store.c
index 888bd1b..eea44f2 100644 (file)
@@ -472,8 +472,8 @@ static BlueSkyStoreImplementation filestore_impl = {
 void bluesky_store_init()
 {
     store_implementations = g_hash_table_new(g_str_hash, g_str_equal);
-    notifier_thread_pool = g_thread_pool_new(notifier_task, NULL, -1, FALSE,
-                                             NULL);
+    notifier_thread_pool = g_thread_pool_new(notifier_task, NULL,
+                                             bluesky_max_threads, FALSE, NULL);
     bluesky_store_register(&memstore_impl, "mem");
     bluesky_store_register(&filestore_impl, "file");
 }