Message407841
Or, maybe, there is a way to do everything without changing public API.
The idea is: _wake_up_next can create a future which is set by *waked up task* on its acquiring. acquire method should wait for this future first before entering in `while self._value < 0:` loop.
If the future is cancelled, `_wake_up_next` should be called again and waiting for the next future acquiring to be performed.
If there is no *acquire waiting* future exists -- do everything as usual.
All other lock objects should be modified also. |
|
Date |
User |
Action |
Args |
2021-12-06 16:57:06 | asvetlov | set | recipients:
+ asvetlov, yselivanov, hyzyla |
2021-12-06 16:57:06 | asvetlov | set | messageid: <1638809826.96.0.955832539408.issue45997@roundup.psfhosted.org> |
2021-12-06 16:57:06 | asvetlov | link | issue45997 messages |
2021-12-06 16:57:06 | asvetlov | create | |
|