diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-18 10:36:06 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-18 10:36:06 (GMT) |
commit | cdd8467ca9910266bde559a0725852858bd6b123 (patch) | |
tree | 5fb2affdbb29cd1e3c3ed61e06d9eada6cff394f /generic/tclEvent.c | |
parent | 76df95e6e49c926b2b3f71f8b740221e897a7643 (diff) | |
parent | 099345d98c26c7c3b683fb4739fab70524532ed1 (diff) | |
download | tcl-cdd8467ca9910266bde559a0725852858bd6b123.zip tcl-cdd8467ca9910266bde559a0725852858bd6b123.tar.gz tcl-cdd8467ca9910266bde559a0725852858bd6b123.tar.bz2 |
Fix [3611974]: InitSubsystems multiple thread issue
Diffstat (limited to 'generic/tclEvent.c')
-rw-r--r-- | generic/tclEvent.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c index c8ba1e6..686b80d 100644 --- a/generic/tclEvent.c +++ b/generic/tclEvent.c @@ -1030,14 +1030,8 @@ TclInitSubsystems(void) TclpInitLock(); if (subsystemsInitialized == 0) { - /* - * Have to set this bit here to avoid deadlock with the routines - * below us that call into TclInitSubsystems. - */ - - subsystemsInitialized = 1; - /* + /* * Initialize locks used by the memory allocators before anything * interesting happens so we can use the allocators in the * implementation of self-initializing locks. @@ -1061,6 +1055,7 @@ TclInitSubsystems(void) TclInitEncodingSubsystem(); /* Process wide encoding init. */ TclpSetInterfaces(); TclInitNamespaceSubsystem();/* Register ns obj type (mutexed). */ + subsystemsInitialized = 1; } TclpInitUnlock(); } |