Commit 04dc045b authored by Lukáš Krupčík's avatar Lukáš Krupčík

deleted: m/multiprocess/test.py

parent eae599e8
Pipeline #5849 passed with stage
in 14 seconds
#!/usr/bin/env python
#
# nasledujici funguje v standardnim pythonu ale treba ne v defaultnim 2.7.5 na CentOSu
import multiprocessing
print multiprocessing.__version__
def f(x): return x*x
pool = multiprocessing.Pool(processes=4)
print pool.map(f, range(10))
pool.close()
pool.join()
#!/usr/bin/env python
#
# nasledujici funguje pouze pod multiprocess s podporou dill
import multiprocess
pool = multiprocess.Pool(processes=4)
print (pool.map(lambda x: (lambda y:y**2)(x) + x, xrange(10)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment