Skip to content

Instantly share code, notes, and snippets.

@yunhan0
Created July 20, 2017 02:50
Show Gist options
  • Save yunhan0/6ded12b404e152a6783e0c26f3efdfb4 to your computer and use it in GitHub Desktop.
Save yunhan0/6ded12b404e152a6783e0c26f3efdfb4 to your computer and use it in GitHub Desktop.
MultiprocessingPython
from multiprocessing import Process
def func1():
for i in range(0, 1000):
print i
def func2():
print "hello world"
if __name__ == '__main__':
p1 = Process(target = func1)
p1.start()
p2 = Process(target = func2)
p2.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment