Skip to content

Instantly share code, notes, and snippets.

@studiawan
Created October 31, 2013 18:30
Show Gist options
  • Save studiawan/7254585 to your computer and use it in GitHub Desktop.
Save studiawan/7254585 to your computer and use it in GitHub Desktop.
Thread example in Python 03
# http://pymotw.com/2/threading/index.html
import threading
def worker(num):
print 'Worker: %s' % num
threads = []
for i in range(5):
t = threading.Thread(target=worker, args=(i,))
threads.append(t)
t.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment