mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Close #24784: Fix compilation without thread support
Add "#ifdef WITH_THREAD" around cals to: * PyGILState_Check() * _PyImport_AcquireLock() * _PyImport_ReleaseLock()
This commit is contained in:
parent
647dac9d6f
commit
92f0113701
3 changed files with 18 additions and 2 deletions
|
@ -719,8 +719,10 @@ sock_call_ex(PySocketSockObject *s,
|
|||
int deadline_initialized = 0;
|
||||
int res;
|
||||
|
||||
#ifdef WITH_THREAD
|
||||
/* sock_call() must be called with the GIL held. */
|
||||
assert(PyGILState_Check());
|
||||
#endif
|
||||
|
||||
/* outer loop to retry select() when select() is interrupted by a signal
|
||||
or to retry select()+sock_func() on false positive (see above) */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue