mono/mono — pull request #725 by knocte (2013-08-02 14:44:41+00:00)
Title: [ThreadPool] Allow heavier initialization when using --server flag

Create on demand up to min_threads to avoid startup penalty, avoiding
throttling of threadpool worker thread creation (for now, using
a --server flag) at initialization.

When throttling happens, operations such as parallel https requests were
slowed down significantly due to all of the threads created in order
to complete the SSL operations.

Based on @kamalaboulhosn's pull request (https://github.com/mono/mono/pull/640), addressing Miguel's comment.

(Tried putting the gboolean variable in mini.c/mini.h, but this didn't work, as it would cause this compilation error:
make[3]: Entering directory `/home/knocte/Documents/Code/mymono/mono/metadata'
CC libmonoruntime_la-mono-config.lo
CC libmonoruntime_la-threadpool.lo
In file included from threadpool.c:22:0:
../../mono/mini/mini.h:52:2: error: #error "The code in mini/ should not depend on these defines."
make[3]: *** [libmonoruntime_la-threadpool.lo] Error 1
make[3]: Leaving directory `/home/knocte/Documents/Code/mymono/mono/metadata'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/knocte/Documents/Code/mymono/mono'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/knocte/Documents/Code/mymono'
make: *** [all] Error 2

So I moved it to mono-config.)