Skip to content

Instantly share code, notes, and snippets.

@studiawan
Created October 31, 2013 18:30
Show Gist options
  • Save studiawan/7254593 to your computer and use it in GitHub Desktop.
Save studiawan/7254593 to your computer and use it in GitHub Desktop.
Thread example in Python 04
# http://pymotw.com/2/threading/index.html
import threading
import logging
logging.basicConfig(level=logging.DEBUG, format='(%(threadName)-10s) %(message)s', )
class MyThread(threading.Thread):
def run(self):
logging.debug('running')
for i in range(5):
t = MyThread()
t.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment