Skip to content
Snippets Groups Projects
Commit 74cba55a authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

add __slots__ to LockedStructure

parent d8247f53
No related branches found
No related tags found
No related merge requests found
import typing as tp
import threading
import typing as tp
from ..structures.proxy import Proxy
T = tp.TypeVar('T')
......@@ -23,6 +24,7 @@ class LockedStructure(Proxy, tp.Generic[T]):
Note that in-place operations return the locked structure.
"""
__slots__ = ('__lock',)
def __init__(self, obj_to_wrap: T, lock: tp.Optional[threading.Lock] = None):
super().__init__(obj_to_wrap)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment