With “args” vs without “args” to pass arguments to a thread in Python
This does not call test in a new thread: thread = threading.Thread(target=test(“Test”)) thread.start() Here’s how Python interprets those lines of code: Main thread calls test(“Test”). test(“Test”) returns None. Main thread calls Thread(target=None).* Main thread starts the new thread. New thread does absolutely nothing at all because its target is None. Edit: *I wondered why Thread(targe=None) … Read more