aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32.c
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>2014-03-25 18:00:37 +0200
committerEli Zaretskii <[email protected]>2014-03-25 18:00:37 +0200
commitdefd53bdc5ef9d75fa112487d76f4d7a4cb9fe92 (patch)
tree74a6ded6b17e777ad30256887d54ef0d17a7287c /src/w32.c
parent1e952f0a7a1d0cc533438dcad37db08d8af6855f (diff)
Speed up thread startup on MS-Windows.
src/w32.c (w32_delayed_load): Call DisableThreadLibraryCalls on the DLL handle, to speed up thread startup.
Diffstat (limited to 'src/w32.c')
-rw-r--r--src/w32.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/w32.c b/src/w32.c
index 8802e13e71..1ffb6ec171 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -8702,6 +8702,13 @@ w32_delayed_load (Lisp_Object library_id)
/* Possibly truncated */
? make_specified_string (name, -1, len, 1)
: Qnil);
+ /* This prevents thread start and end notifications
+ from being sent to the DLL, for every thread we
+ start. We don't need those notifications because
+ threads we create never use any of these DLLs, only
+ the main thread uses them. This is supposed to
+ speed up thread creation. */
+ DisableThreadLibraryCalls (dll_handle);
break;
}
}