mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
Release interpreter lock around readline call in [raw_]input().
This commit is contained in:
parent
5edcf34fac
commit
ee81af8977
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue