Guido van Rossum wrote: > Tim is right, the UNLOCK/LOCK part is implied in the wait() call. > However, the wait() implementation really *does* provide a use case > for the primitive operation that Nick proposed, and it can't be > refactored to remove the pattern Martin disapproves of (though of > course the existing try/finally is fine). I'm not sure if the use case > is strong enough to warrant adding it; I think it's fine not to > support it directly. Ah, you mean that the wait implementation *itself* should use the unlocked() context (which calls release on enter, and acquire on exit). That wouldn't work, as _Condition.wait doesn't use release/enter, but _release_save/_acquire_restore. So the unlocked context couldn't be used there if it existed. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4