[tor-commits] [stem/master] Optimize `_MsgLock` a little bit

atagar at torproject.org atagar at torproject.org
Thu Jul 16 01:28:59 UTC 2020


commit 2b4d3666ef9d3a9faf6742bd5ccfdef88cfbe4fd
Author: Illia Volochii <illia.volochii at 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()





More information about the tor-commits mailing list