
Python Threading
By:
ionutHulub on
Mar 9th, 2013 | syntax:
Python | size: 0.25 KB | hits: 4 | expires: Never
import threading
from time import sleep
def one():
while True:
print 'ello'
sleep(2)
def two():
while True:
raw_input()
t1 = threading.Thread(target=one)
t2 = threading.Thread(target=two)
t1.start()
t2.start()
t1.join()
t2.join()