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):
134134 } # Mapping of Thing Description ops to class methods
135135 _cls_tags = {"actions" }
136136 _deque = Deque () # Action queue
137- _emergency_pool = Pool ()
137+ _emergency_pool = Pool () # Emergency thread pool (common to all ActionView subclasses)
138138
139139 def __init__ (self , * args , ** kwargs ):
140-
141140 super ().__init__ (* args , ** kwargs )
142141
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+
143149 @classmethod
144150 def get (cls ):
145151 """
You can’t perform that action at this time.
0 commit comments