Re: Threads vs subprocesses

2012-06-17 Thread Cameron Simpson
On 18Jun2012 00:17, John O'Hagan wrote: | On Sat, 16 Jun 2012 13:27:45 -0400 | Dennis Lee Bieber wrote: | > Not "after each event is read" but when a new event is | > generated/inserted. The list is not a FIFO where new events are added to | > the end, but more of a priority queue where the l

Re: Threads vs subprocesses

2012-06-17 Thread John O'Hagan
On Sat, 16 Jun 2012 13:27:45 -0400 Dennis Lee Bieber wrote: > On Sat, 16 Jun 2012 20:01:12 +1000, John O'Hagan > declaimed the following in > gmane.comp.python.general: > > > > > That looks like a possible way to do all the streams in a single thread, > > although it works a little differently

Re: Threads vs subprocesses

2012-06-16 Thread John O'Hagan
On Fri, 15 Jun 2012 16:34:57 -0400 Dennis Lee Bieber wrote: > On Sat, 16 Jun 2012 03:24:13 +1000, John O'Hagan > declaimed the following in > gmane.comp.python.general: > > > > I should have made it clear that I'm not using threads to speed anything up; > > each thread produces an independentl

RE: Threads vs subprocesses

2012-06-15 Thread Prasad, Ramit
> > > My question is, on a single core machine, what are the pros and cons of > > > threads vs subprocesses in a setup like this? > > > > [...] > > > > Two key phrases in your message; CPU-intensive, > > single-core-machine. If these have the conventional meaning, you're > > better off doing all

Re: Threads vs subprocesses

2012-06-15 Thread John O'Hagan
On Fri, 15 Jun 2012 11:51:01 -0400 Dave Angel wrote: > On 06/15/2012 09:49 AM, John O'Hagan wrote: > > I have a program in which the main thread launches a number of CPU-intensive > > worker threads. For each worker thread two python subprocesses are started, [...] > > > > So far so good, but it

Re: Threads vs subprocesses

2012-06-15 Thread Dave Angel
On 06/15/2012 09:49 AM, John O'Hagan wrote: > I have a program in which the main thread launches a number of CPU-intensive > worker threads. For each worker thread two python subprocesses are started, > each of which runs in its own terminal: one displays output received from the > worker thread vi