diff options
author | Guido van Rossum <guido@python.org> | 1997-12-29 20:03:10 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-12-29 20:03:10 (GMT) |
commit | 1d0d7e4e48ce80cc5edc033983b25e7eadd762d1 (patch) | |
tree | 0a5943228e9de3e033a259182f0c8474a9bd9cdd /Modules/timemodule.c | |
parent | d7feffdd5f2e050a69a48417521e3900130c31d1 (diff) | |
download | cpython-1d0d7e4e48ce80cc5edc033983b25e7eadd762d1.zip cpython-1d0d7e4e48ce80cc5edc033983b25e7eadd762d1.tar.gz cpython-1d0d7e4e48ce80cc5edc033983b25e7eadd762d1.tar.bz2 |
At Jeff Rush' request, add Py_BEGIN/END_ALLOW_THREADS around call to
DosSleep().
Diffstat (limited to 'Modules/timemodule.c')
-rw-r--r-- | Modules/timemodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/timemodule.c b/Modules/timemodule.c index ce16ecc..1791cf4 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 |