mirror of https://github.com/python/cpython
Release interpreter lock around readline call in [raw_]input().
This commit is contained in:
parent
5edcf34fac
commit
ee81af8977
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue