Release interpreter lock around readline call in [raw_]input().

This commit is contained in:
Guido van Rossum 1997-09-26 21:47:43 +00:00
parent 5edcf34fac
commit ee81af8977
1 changed files with 2 additions and 0 deletions

View File

@ -1349,7 +1349,9 @@ builtin_raw_input(self, args)
po = NULL; po = NULL;
prompt = ""; prompt = "";
} }
Py_BEGIN_ALLOW_THREADS
s = PyOS_Readline(prompt); s = PyOS_Readline(prompt);
Py_END_ALLOW_THREADS
Py_XDECREF(po); Py_XDECREF(po);
if (s == NULL) { if (s == NULL) {
PyErr_SetNone(PyExc_KeyboardInterrupt); PyErr_SetNone(PyExc_KeyboardInterrupt);