This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Ivan.Pozdeev
Recipients Ivan.Pozdeev, paul.moore, steve.dower, tim.golden, zach.ware
Date 2018-04-24.21:36:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1524605816.86.0.682650639539.issue33316@psf.upfronthosting.co.za>
In-reply-to
Content
In all PyMUTEX_* and most PyCOND_* functions, all the underlying APIs are void. So there's no point for the functions to return anything other than as convention.

A comment at the start of condvar.h says: "APIs generally return 0 on success and non-zero on error".
In Python\ceval_gil.h:57, there are boilerplace checker macros for them
(which will never fire).

So I guess this is done for uniformity.
Regardless, PyMUTEX_UNLOCK and PyMUTEX_LOCK at least are called both with and without checking the return value.


So I would drop the pretense and make these fns void.

---

That said, the reported error still persists after the fix.
The code confusing about which value LeaveNonRecursiveMutex should return on success. Pushed another commit, confirmed to work now.
History
Date User Action Args
2018-04-24 21:36:56Ivan.Pozdeevsetrecipients: + Ivan.Pozdeev, paul.moore, tim.golden, zach.ware, steve.dower
2018-04-24 21:36:56Ivan.Pozdeevsetmessageid: <1524605816.86.0.682650639539.issue33316@psf.upfronthosting.co.za>
2018-04-24 21:36:56Ivan.Pozdeevlinkissue33316 messages
2018-04-24 21:36:56Ivan.Pozdeevcreate