[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 2b4d3666ef9d3a9faf6742bd5ccfdef88cfbe4fd
Author: Illia Volochii <illia.volochii@xxxxxxxxx>
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits