Message315714
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. |
|
Date |
User |
Action |
Args |
2018-04-24 21:36:56 | Ivan.Pozdeev | set | recipients:
+ Ivan.Pozdeev, paul.moore, tim.golden, zach.ware, steve.dower |
2018-04-24 21:36:56 | Ivan.Pozdeev | set | messageid: <1524605816.86.0.682650639539.issue33316@psf.upfronthosting.co.za> |
2018-04-24 21:36:56 | Ivan.Pozdeev | link | issue33316 messages |
2018-04-24 21:36:56 | Ivan.Pozdeev | create | |
|