This commit is contained in:
Stephen Mardson McQuay
2009-12-27 10:48:27 -07:00
commit 961b3b7b26
19 changed files with 560 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
#!/usr/bin/python
from multiprocessing import Pool
def f(x):
return x*x
if __name__ == '__main__':
pool = Pool(processes = 4)
result = pool.apply_async(f, (10,))
print result.get()
print pool.map(f, range(10))