-/*
- * threadpool.c: Microsoft threadpool runtime support
+/**
+ * \file
+ * Microsoft threadpool runtime support
*
* Author:
* Ludovic Henry (ludovic.henry@xamarin.com)
mono_coop_mutex_destroy (&threadpool.domains_lock);
}
+static void
+worker_callback (void);
+
static void
initialize (void)
{
threadpool.limit_io_min = mono_cpu_count ();
threadpool.limit_io_max = CLAMP (threadpool.limit_io_min * 100, MIN (threadpool.limit_io_min, 200), MAX (threadpool.limit_io_min, 200));
- mono_threadpool_worker_init ();
+ mono_threadpool_worker_init (worker_callback);
}
static void
}
static void
-worker_callback (gpointer unused)
+worker_callback (void)
{
MonoError error;
ThreadPoolDomain *tpdomain, *previous_tpdomain;
counter._.starting ++;
});
- mono_threadpool_worker_enqueue (worker_callback, NULL);
+ mono_threadpool_worker_request ();
mono_refcount_dec (&threadpool);
return TRUE;