I have Python class with indefinitely blocking task method
class A(object):
def __init__(self):
# start task
def task(self):
while True:
#do some work
I want to start execution of the task in constructor of A. It will probably need to be run in its own thread as the task is blocking. How to do that in Python 2.7?