On Monday, October 24, 2016 at 12:39:47 PM UTC-5, Thomas Nyberg wrote:
> On 10/24/2016 12:45 PM, pic8...@gmail.com wrote:
> > Thanks for the reply.
> >
> > The code snippet given by Peter is not very clear
> >
> > I would like to multiprocess a function which is written in python of the
> > form b
On Sunday, October 23, 2016 at 3:44:16 PM UTC-5, Thomas Nyberg wrote:
> On 10/23/2016 03:12 AM, pic8...@gmail.com wrote:
> > import multiprocessing as mp
> >
> > def bar(**kwargs):
> >for a in kwargs:
> > print a,kwargs[a]
> >
> > arguments={'name':'Joe','age':20}
> > p=mp.Pool(processes=
import multiprocessing as mp
def bar(**kwargs):
for a in kwargs:
print a,kwargs[a]
arguments={'name':'Joe','age':20}
p=mp.Pool(processes=4)
p.map(bar,**arguments)
p.close()
p.join()
Errors:
Traceback (most recent call last):
File "post.py", line 9, in
p.map(bar,**arguments)
import multiprocessing as mp
def bar(**kwargs):
for a in kwargs:
print a,kwargs[a]
arguments={'name':'Joe','age':20}
p=mp.Pool(processes=4)
p.map(bar,**arguments)
p.close()
p.join()
Errors:
Traceback (most recent call last):
File "post.py", line 9, in
p.map(bar,**arguments)