issue 9786 Native TLS support for pthreads

PyThread_create_key now has a failure mode that the applicatino can detect.
This commit is contained in:
Kristján Valur Jónsson 2010-09-20 02:11:49 +00:00
parent 3d8580f690
commit 2fea9b961d
3 changed files with 49 additions and 1 deletions

View file

@ -315,7 +315,10 @@ _pythread_nt_set_stacksize(size_t size)
int
PyThread_create_key(void)
{
return (int) TlsAlloc();
DWORD result= TlsAlloc();
if (result == TLS_OUT_OF_INDEXES)
return -1;
return (int)result;
}
void