mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
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:
parent
3d8580f690
commit
2fea9b961d
3 changed files with 49 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue