Skip to content

Instantly share code, notes, and snippets.

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