File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -134,12 +134,18 @@ class ActionView(View):
134
134
} # Mapping of Thing Description ops to class methods
135
135
_cls_tags = {"actions" }
136
136
_deque = Deque () # Action queue
137
- _emergency_pool = Pool ()
137
+ _emergency_pool = Pool () # Emergency thread pool (common to all ActionView subclasses)
138
138
139
139
def __init__ (self , * args , ** kwargs ):
140
-
141
140
super ().__init__ (* args , ** kwargs )
142
141
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
+
143
149
@classmethod
144
150
def get (cls ):
145
151
"""
You can’t perform that action at this time.
0 commit comments