Message243268
Yes actually it produce no erroe on standalone script. But the script
executes without any outputs. not even for numpy function. I used code
below in script.
import multiprocessing
import numpy
def f(x):
return x*x
if __name__ = "__main__":
p= multiprocessing.Pool(5)
print p.map(numpy.sqrt,[1,2,3,4])
print p.map(f,[1,2,3,4])
On May 15, 2015 2:52 PM, "Paul Moore" <report@bugs.python.org> wrote:
>
> Paul Moore added the comment:
>
> Multiprocessing works by firing up additional processes. Those processes
> won't have access to functions defined in the interactive interpreter.
>
> Can you reproduce this problem in a standalone script? I suspect not, but
> if you can please post the script here.
>
> Marking as "not a bug", but I haven't closed it yet in case a script
> reproducing the issue can be provided.
>
> ----------
> nosy: +paul.moore
> resolution: -> not a bug
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue24202>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2015-05-15 13:56:59 | abheeman | set | recipients:
+ abheeman, paul.moore, tim.golden, zach.ware, steve.dower, davin |
2015-05-15 13:56:59 | abheeman | link | issue24202 messages |
2015-05-15 13:56:59 | abheeman | create | |
|