I'm simply trying to pass self
and 2 other arguments to a thread, but I'm getting an error every time.
I tried following other samples, but nothing has worked so far.
class X:
def start(self):
newStartupThread = threading.Thread(target=self.launch, args=(t1_stop,
self.launchAdditionalParams))
newStartupThread.name = "ClientLaunchThread%d" %
(self.launchAttemptCount+1)
newStartupThread.daemon = True
newStartupThread.start()
def launch(self, test, additionalParams):
pass
I'm getting this error:
TypeError: launch() takes at most 2 arguments (3 given)
**Edited the code to show that it is in a class