threading python arguments code example
Example 1: thread with args python
dRecieved = connFile.readline()
processThread = threading.Thread(target=processLine, args=(dRecieved,)) # <- note extra ','
processThread.start()
Example 2: python thread with parameters
thread = threading.Thread(target=function, args=(arg1, arg2), kwargs=dict(x=3,delay=0.25))