Message 79503 - Python tracker (original) (raw)

Windows NT (3.1, and a number of later versions) only support 64 TLS keys. Starting with Windows 2000, they added another page per thread for TLS, giving an addition 1024 TLS slots, for a total of 1088 TLS slots. FWIW, Win 9.x supported 80 TLS slots. See

http://www.nynaeve.net/?p=181 http://msdn.microsoft.com/en-us/library/ms686749.aspx http://bugs.python.org/file11141/thread_nt.patch

TLS slots are typically considered a scarce resource, so that programming language implementations typically don't allow applications direct allocation of TLS slots. Instead, most runtimes I know of will allocate a single TLS slot for themselves, which then is filled with an array or a dictionary.