commit 2b4d3666ef9d3a9faf6742bd5ccfdef88cfbe4fd Author: Illia Volochii illia.volochii@gmail.com Date: Thu Apr 30 19:30:00 2020 +0300
Optimize `_MsgLock` a little bit --- stem/control.py | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/stem/control.py b/stem/control.py index ff0f3bc1..6de671b6 100644 --- a/stem/control.py +++ b/stem/control.py @@ -554,6 +554,8 @@ def event_description(event: str) -> str:
class _MsgLock: + __slots__ = ('_r_lock', '_async_lock') + def __init__(self): self._r_lock = threading.RLock() self._async_lock = asyncio.Lock()
tor-commits@lists.torproject.org