python multiprocessing question

2017-09-03 Thread Xristos Xristoou
hello i have create a 4 function using python(f1,f2,f3,f4) and i have 4 cores in my system. def f1() ... ... def f2() ... ... def f3() ... ... def f4() ... .

Re: Multiprocessing question

2014-07-14 Thread Roy Smith
In article <53c34400$0$9505$c3e8da3$54964...@news.astraweb.com>, Steven D'Aprano wrote: > On Sun, 13 Jul 2014 19:53:09 -0400, Paul LaFollette wrote: > > > I have thrown together a little C/UNIX program that forks a child > > process, then proceeds to let the child and parent alternate. Either

Re: Multiprocessing question

2014-07-13 Thread Marko Rauhamaa
Gary Herron : > On 07/13/2014 04:53 PM, Paul LaFollette wrote: >> I have thrown together a little C/UNIX program that forks a child >> process, then proceeds to let the child and parent alternate. Either >> can run until it pauses itself and wakes the other. >> >> [...] > > What do you gain from u

Re: Multiprocessing question

2014-07-13 Thread Steven D'Aprano
On Sun, 13 Jul 2014 19:53:09 -0400, Paul LaFollette wrote: > I have thrown together a little C/UNIX program that forks a child > process, then proceeds to let the child and parent alternate. Either > can run until it pauses itself and wakes the other. > > I would like to know if there be a way t

Re: Multiprocessing question

2014-07-13 Thread Gary Herron
On 07/13/2014 04:53 PM, Paul LaFollette wrote: Kind people, I have thrown together a little C/UNIX program that forks a child process, then proceeds to let the child and parent alternate. Either can run until it pauses itself and wakes the other. I would like to know if there be a way to cre

Multiprocessing question

2014-07-13 Thread Paul LaFollette
Kind people, I have thrown together a little C/UNIX program that forks a child process, then proceeds to let the child and parent alternate. Either can run until it pauses itself and wakes the other. I would like to know if there be a way to create the same behavior in Python 3, preferably in a n

Re: multiprocessing question

2010-01-18 Thread MRAB
Neal Becker wrote: I'm using multiprocessing as a crude batch queuing system, like this: import my_test_program as prog (where my_test_program has a function called 'run') def run_test (args): prog.run (args[1:]) cases = [] for t in test_conditions: args = [prog.__name__]+[more args...]

multiprocessing question

2010-01-18 Thread Neal Becker
I'm using multiprocessing as a crude batch queuing system, like this: import my_test_program as prog (where my_test_program has a function called 'run') def run_test (args): prog.run (args[1:]) cases = [] for t in test_conditions: args = [prog.__name__]+[more args...] cases.append (args

Re: multiprocessing question/error

2009-01-17 Thread Gabriel Genellina
En Sat, 17 Jan 2009 14:14:37 -0200, Eduardo Lenz escribió: Another question: is it possible to change a bound method to a function on the fly ? I was wondering if something like class.__dict__["function_name"] could do the job. Exactly. Or, if you already have the method, use its im_func

Re: multiprocessing question/error

2009-01-17 Thread Eduardo Lenz
On Saturday 17 January 2009 00:43:35 Aaron Brady wrote: > On Jan 16, 11:39 pm, Eduardo Lenz wrote: > > Hi, > > > > I was using the former processing package with python 2.5 with no > > problems. After switching to python 2.6.1 I am having some problems with > > the same code. The problem seems to

Re: multiprocessing question/error

2009-01-17 Thread Aaron Brady
On Jan 16, 11:39 pm, Eduardo Lenz wrote: > Hi, > > I was using the former processing package with python 2.5 with no problems. > After switching to python 2.6.1 I am having some problems with the same code. > The problem seems to be related to the fact that I am using Pool.map > with a bounded met

multiprocessing question/error

2009-01-16 Thread Eduardo Lenz
Hi, I was using the former processing package with python 2.5 with no problems. After switching to python 2.6.1 I am having some problems with the same code. The problem seems to be related to the fact that I am using Pool.map with a bounded method, since it is inside a class. To clarify a little

multiprocessing question/error

2009-01-16 Thread Eduardo Lenz
Hi, I was using the former processing package with python 2.5 with no problems. After switching to python 2.6.1 I am having some problems with the same code. The problem seems to be related to the fact that I am using Pool.map with a bounded method, since it is inside a class. To clarify a little