Skip to content

Instantly share code, notes, and snippets.

@hktechn0
Created February 6, 2010 14:29
Show Gist options
  • Save hktechn0/296741 to your computer and use it in GitHub Desktop.
Save hktechn0/296741 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import threading
import time
class test(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.setDaemon(True)
self.i = 0
def run(self):
print "Start."
while True:
time.sleep(10)
self.i += 1
print self.i * 10
if __name__ == "__main__":
t = test()
t.start()
time.sleep(30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment