Mooon
0
Q:

how to thread python

import threading, time

def worker():
    """thread worker function"""
    print('Worker')
    return

threads = []
for i in range(5):
    t = threading.Thread(target=worker)
    threads.append(t)
    t.start()
    print('Thread')
    
1

New to Communities?

Join the community