From: Guido van Rossum Date: Mon, 29 Dec 1997 20:03:10 +0000 (+0000) Subject: At Jeff Rush' request, add Py_BEGIN/END_ALLOW_THREADS around call to X-Git-Tag: v1.5~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d0d7e4e48ce80cc5edc033983b25e7eadd762d1;p=thirdparty%2FPython%2Fcpython.git At Jeff Rush' request, add Py_BEGIN/END_ALLOW_THREADS around call to DosSleep(). --- diff --git a/Modules/timemodule.c b/Modules/timemodule.c index ce16ecc6d983..1791cf475d04 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -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