Index: Modules/_multiprocessing/connection.h =================================================================== --- Modules/_multiprocessing/connection.h (revision 65364) +++ Modules/_multiprocessing/connection.h (working copy) @@ -129,9 +129,7 @@ } } - Py_BEGIN_ALLOW_THREADS res = conn_send_string(self, buffer + offset, size); - Py_END_ALLOW_THREADS if (res < 0) return mp_SetError(PyExc_IOError, res); @@ -266,9 +264,7 @@ if (PyString_AsStringAndSize(pickled_string, &buffer, &length) < 0) goto failure; - Py_BEGIN_ALLOW_THREADS res = conn_send_string(self, buffer, (int)length); - Py_END_ALLOW_THREADS if (res < 0) { mp_SetError(PyExc_IOError, res); Index: Modules/_multiprocessing/socket_connection.c =================================================================== --- Modules/_multiprocessing/socket_connection.c (revision 65364) +++ Modules/_multiprocessing/socket_connection.c (working copy) @@ -88,18 +88,24 @@ *(UINT32*)message = htonl((UINT32)length); memcpy(message+4, string, length); + Py_BEGIN_ALLOW_THREADS res = _conn_sendall(conn->handle, message, length+4); + Py_END_ALLOW_THREADS PyMem_Free(message); return res; } else { UINT32 lenbuff; + int res; if (length> MAX_MESSAGE_LENGTH) return MP_BAD_MESSAGE_LENGTH; lenbuff = htonl((UINT32)length); - return _conn_sendall(conn->handle, (char*)&lenbuff, 4) || + Py_BEGIN_ALLOW_THREADS + res = _conn_sendall(conn->handle, (char*)&lenbuff, 4) || _conn_sendall(conn->handle, string, length); + Py_END_ALLOW_THREADS + return res; } }

AltStyle によって変換されたページ (->オリジナル) /