You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ENH]: Turn widgets.LockDraw into a context manager #24703
We never actually call .release() in the same function as where we acquire the lock, so the contextmanager doesn't really help here.
The owner object is there to allow the same object to acquire a given lock multiple times (acquiring a second time is a noop), but I agree we should probably just check carefully all call sites to see whether that's actually a functionality we need.
Hello @timhoffm! I'm trying to work in this issue and i'm not currently finding any occurrences of this in the codebase. This issue need to be work on the present version? If there are any occurrences plese tell me that I will enjoy to do it. Thank you!
Hi! I implemented these enter and exit methods in the LockDraw Class at widgets.py. There is enough to turn it on a context manager? Also, In exit is necessary to verify if is in the right state? Thank you!
Activity
anntzer commentedon Jan 2, 2023
We never actually call .release() in the same function as where we acquire the lock, so the contextmanager doesn't really help here.
The owner object is there to allow the same object to acquire a given lock multiple times (acquiring a second time is a noop), but I agree we should probably just check carefully all call sites to see whether that's actually a functionality we need.
thiagoluisbecker commentedon May 3, 2023
Hello @timhoffm! I'm trying to work in this issue and i'm not currently finding any occurrences of this in the codebase. This issue need to be work on the present version? If there are any occurrences plese tell me that I will enjoy to do it. Thank you!
thiagoluisbecker commentedon May 19, 2023
Hi! I implemented these enter and exit methods in the LockDraw Class at widgets.py. There is enough to turn it on a context manager? Also, In exit is necessary to verify if is in the right state? Thank you!
timhoffm commentedon Feb 2, 2025
It’s not clear this is actually helpful.