We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dee38d3 commit 37cc448Copy full SHA for 37cc448
1 file changed
src/labthings/views/__init__.py
@@ -134,12 +134,18 @@ class ActionView(View):
134
} # Mapping of Thing Description ops to class methods
135
_cls_tags = {"actions"}
136
_deque = Deque() # Action queue
137
- _emergency_pool = Pool()
+ _emergency_pool = Pool() # Emergency thread pool (common to all ActionView subclasses)
138
139
def __init__(self, *args, **kwargs):
140
-
141
super().__init__(*args, **kwargs)
142
+ def __init_subclass__(cls):
143
+ """
144
+ Here we handle all class attributes that should be specific to each subclass of ActionView.
145
+ Without this block, for example, all subclasses of ActionView will share the superclass _deque.
146
147
+ cls._deque = Deque() # Action queue
148
+
149
@classmethod
150
def get(cls):
151
"""
0 commit comments