diff options
author | Rickard Green <[email protected]> | 2013-01-21 22:07:51 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2013-01-21 22:07:51 +0100 |
commit | 706fea8a950196661b9f8038d3b0d9b63bd607db (patch) | |
tree | f2b6cfe35d7276272ccc5dcb24c4e7df49e3b6f5 /erts | |
parent | bdcc3a41d5d6ba82bb50850261a352c13104d3fc (diff) | |
download | otp-706fea8a950196661b9f8038d3b0d9b63bd607db.tar.gz otp-706fea8a950196661b9f8038d3b0d9b63bd607db.tar.bz2 otp-706fea8a950196661b9f8038d3b0d9b63bd607db.zip |
Use async threads by default
Diffstat (limited to 'erts')
-rw-r--r-- | erts/doc/src/erl.xml | 2 | ||||
-rw-r--r-- | erts/emulator/beam/erl_init.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 99f2466d79..a79a2d5c48 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -479,7 +479,7 @@ <tag><marker id="async_thread_pool_size"><c><![CDATA[+A size]]></c></marker></tag> <item> <p>Sets the number of threads in async thread pool, valid range - is 0-1024. Default is 0.</p> + is 0-1024. If thread support is available, the default is 10.</p> </item> <tag><c><![CDATA[+B [c | d | i]]]></c></tag> <item> diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index 8cdf954dd2..8db3c28378 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -55,6 +55,8 @@ # include <sys/resource.h> #endif +#define ERTS_DEFAULT_NO_ASYNC_THREADS 10 + /* * The variables below (prefixed with etp_) are for erts/etc/unix/etp-commands * only. Do not remove even though they aren't used elsewhere in the emulator! @@ -631,7 +633,7 @@ early_init(int *argc, char **argv) /* erts_disable_tolerant_timeofday = 0; display_items = 200; erts_backtrace_depth = DEFAULT_BACKTRACE_SIZE; - erts_async_max_threads = 0; + erts_async_max_threads = ERTS_DEFAULT_NO_ASYNC_THREADS; erts_async_thread_suggested_stack_size = ERTS_ASYNC_THREAD_MIN_STACK_SIZE; H_MIN_SIZE = H_DEFAULT_SIZE; BIN_VH_MIN_SIZE = VH_DEFAULT_SIZE; @@ -700,7 +702,7 @@ early_init(int *argc, char **argv) /* if (erts_sys_getenv__("ERL_THREAD_POOL_SIZE", envbuf, &envbufsz) == 0) erts_async_max_threads = atoi(envbuf); else - erts_async_max_threads = 0; + erts_async_max_threads = ERTS_DEFAULT_NO_ASYNC_THREADS; if (erts_async_max_threads > ERTS_MAX_NO_OF_ASYNC_THREADS) erts_async_max_threads = ERTS_MAX_NO_OF_ASYNC_THREADS; |