Created
July 20, 2017 02:50
-
-
Save yunhan0/6ded12b404e152a6783e0c26f3efdfb4 to your computer and use it in GitHub Desktop.
MultiprocessingPython
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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