mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 22:33:42 +02:00
Allow threads while listening for connections on a pipe
This commit is contained in:
parent
2ddbbb3a43
commit
2a1b05dc05
1 changed files with 5 additions and 1 deletions
|
|
@ -709,7 +709,11 @@ static PyObject *
|
|||
connect_named_pipe(PyObject *self, PyObject *args) {
|
||||
HANDLE handle;
|
||||
if (!PyArg_ParseTuple(args, "O&", convert_handle, &handle)) return NULL;
|
||||
if (!ConnectNamedPipe(handle, NULL)) return set_error_from_handle(args);
|
||||
BOOL ok;
|
||||
Py_BEGIN_ALLOW_THREADS;
|
||||
ok = ConnectNamedPipe(handle, NULL)
|
||||
Py_END_ALLOW_THREADS;
|
||||
if (!ok) return set_error_from_handle(args);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue