Re: multiprocessing: child process race to answer

2013-11-03 Thread Mark Lawrence
On 03/11/2013 10:10, capple...@gmail.com wrote: On Friday, November 1, 2013 10:35:47 PM UTC-4, smhall05 wrote: I am using a basic multiprocessing snippet I found: #- from multiprocessing import Pool def f(x): return x*x if __na

Re: multiprocessing: child process race to answer

2013-11-03 Thread cappleman
On Friday, November 1, 2013 10:35:47 PM UTC-4, smhall05 wrote: > I am using a basic multiprocessing snippet I found: > > > > #- > > from multiprocessing import Pool > > > > def f(x): > > return x*x > > > > if __name__ == '__main__'

Re: multiprocessing: child process race to answer (forgot to Cc: the list)

2013-11-02 Thread William Ray Wing
On Nov 2, 2013, at 11:44 AM, Sherard Hall wrote: > Thank you for the response. Processing time is very important so I suspect > having to write to disk will take more time than letting the other processes > complete without finding the answer. So I did some profiling one process > finds the an

Re: multiprocessing: child process race to answer

2013-11-02 Thread Sherard Hall
Thank you for the response. Processing time is very important so I suspect having to write to disk will take more time than letting the other processes complete without finding the answer. So I did some profiling one process finds the answer in about 250ms, but since I can't stop the other processe

Re: multiprocessing: child process race to answer

2013-11-02 Thread William Ray Wing
On Nov 2, 2013, at 1:03 AM, smhall05 wrote: > On Friday, November 1, 2013 10:52:40 PM UTC-4, MRAB wrote: >> On 02/11/2013 02:35, smhall05 wrote: >> >>> I am using a basic multiprocessing snippet I found: >>> >>> #- >>> from multiprocessing imp

Re: multiprocessing: child process race to answer

2013-11-01 Thread smhall05
On Friday, November 1, 2013 10:52:40 PM UTC-4, MRAB wrote: > On 02/11/2013 02:35, smhall05 wrote: > > > I am using a basic multiprocessing snippet I found: > > > > > > #- > > > from multiprocessing import Pool > > > > > > def f(x): > > >

Re: multiprocessing: child process race to answer

2013-11-01 Thread MRAB
On 02/11/2013 02:35, smhall05 wrote: I am using a basic multiprocessing snippet I found: #- from multiprocessing import Pool def f(x): return x*x if __name__ == '__main__': pool = Pool(processes=4) # start 4 worker pro

multiprocessing: child process race to answer

2013-11-01 Thread smhall05
I am using a basic multiprocessing snippet I found: #- from multiprocessing import Pool def f(x): return x*x if __name__ == '__main__': pool = Pool(processes=4) # start 4 worker processes result = pool.apply_async(f, [