I need something that let me use one variable in every class. I have multiclasses that I will use with threading.
class a():
def __init__(self):
self.run = True
def aloop(self):
while self.run:
###do a things
class b():
def __init__(self):
self.run = True
def bloop(self):
while self.run:
###do b things
class c():
def __init__(self):
self.run = True
def cloop(self):
while self.run:
###do c thinks
def close(self):
self.run = False
Is it possible to connect all run
s? So, when one is closed, others should also closed.
I am trying to use this style for ending loops but it can be used for other purposes.