mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-29 20:26:07 -04:00
16 lines
270 B
Python
16 lines
270 B
Python
#!/usr/bin/env python
|
|
|
|
__author__ = "bt3"
|
|
|
|
import threading
|
|
|
|
def worker(num):
|
|
"""thread worker function"""
|
|
print 'Worker: %s' % num
|
|
return
|
|
|
|
threads = []
|
|
for i in range(5):
|
|
t = threading.Thread(target=worker, args=(i,))
|
|
threads.append(t)
|
|
t.start() |