mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
At Jeff Rush' request, add Py_BEGIN/END_ALLOW_THREADS around call to
DosSleep().
This commit is contained in:
parent
d7feffdd5f
commit
1d0d7e4e48
1 changed files with 3 additions and 0 deletions
|
|
@ -610,10 +610,13 @@ floatsleep(double secs)
|
|||
#else /* !MS_WIN32 */
|
||||
#ifdef PYOS_OS2
|
||||
/* This Sleep *IS* Interruptable by Exceptions */
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
if (DosSleep(secs * 1000) != NO_ERROR) {
|
||||
Py_BLOCK_THREADS
|
||||
PyErr_SetFromErrno(PyExc_IOError);
|
||||
return -1;
|
||||
}
|
||||
Py_END_ALLOW_THREADS
|
||||
#else /* !PYOS_OS2 */
|
||||
/* XXX Can't interrupt this sleep */
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue