[issue6362] multiprocessing: handling of errno after signals in sem_acquire()
Tumer Topcu added the comment: Looks like the suggested fix is there in v2.7.6: do { Py_BEGIN_ALLOW_THREADS if (blocking && timeout_obj == Py_None) res = sem_wait(self->handle); else if (!blocking) res = sem_trywait(self->handle); else res = sem_timedwait(self->handle, &deadline); Py_END_ALLOW_THREADS err = errno; if (res == MP_EXCEPTION_HAS_BEEN_SET) break; } while (res < 0 && errno == EINTR && !PyErr_CheckSignals()); if (res < 0) { errno = err; if (errno == EAGAIN || errno == ETIMEDOUT) Py_RETURN_FALSE; else if (errno == EINTR) return NULL; else return PyErr_SetFromErrno(PyExc_OSError); } But I am still able to reproduce the issue following the exact same steps written. -- nosy: +trent, tumert ___ Python tracker <http://bugs.python.org/issue6362> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6362] multiprocessing: handling of errno after signals in sem_acquire()
Tumer Topcu added the comment: Nevermind the last comment (curse of using a loaner laptop), tried again after compiling against the latest repo all works as expected. I believe this issue can be closed. -- ___ Python tracker <http://bugs.python.org/issue6362> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15983] multiprocessing JoinableQueue's join function with timeout
Changes by Tumer Topcu : -- nosy: +tumert, zach.ware ___ Python tracker <http://bugs.python.org/issue15983> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15983] multiprocessing JoinableQueue's join function with timeout
Changes by Tumer Topcu : -- nosy: +trent ___ Python tracker <http://bugs.python.org/issue15983> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15983] multiprocessing JoinableQueue's join function with timeout
Tumer Topcu added the comment: Another option is instead of adding a timeout parameter, a new function to check if everything is done. Like: def all_tasks_finished(self) return self._unfinished_tasks._semlock._is_zero() Which can then be utilized exactly shown in the above noted stackoverflow answer. This way it will be consistent with queue.py -- ___ Python tracker <http://bugs.python.org/issue15983> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com