1dRecieved = connFile.readline()
2processThread = threading.Thread(target=processLine, args=(dRecieved,)) # <- note extra ','
3processThread.start()
4
1thread = threading.Thread(target=function, args=(arg1, arg2), kwargs=dict(x=3,delay=0.25))
1from threading import Thread
2from time import sleep
3def run(name):
4 for x in range(10):
5 print("helo "+name)
6 sleep(1)
7def run1():
8 for x in range(10):
9 print("hi")
10 sleep(1)
11T=Thread(target=run,args=("Ayla",))
12T1=Thread(target=run1)
13T.start()
14sleep(0.2)
15T1.start()
16T.join()
17T1.join()
18print("Bye")
19