Re: collecting results in threading app

2008-04-04 Thread George Sakkis
On Apr 4, 1:54 pm, George Sakkis <[EMAIL PROTECTED]> wrote: > On Apr 4, 11:27 am, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > > There is an approach in which i can 'sum' after *any* thread finish? > > > Could a Queue help me there? > > Yes, you can push each result to a queue and have the main thr

Re: collecting results in threading app

2008-04-04 Thread George Sakkis
On Apr 4, 11:27 am, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > John Nagle wrote: > >Gerardo Herzig wrote: > > >>Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant > >>figure out which one. > > >>This little peace of code executes a 'select count(*)' over every table > >>in

Re: collecting results in threading app

2008-04-04 Thread John Nagle
Gerardo Herzig wrote: > John Nagle wrote: > >> Gerardo Herzig wrote: > Thanks John, that certanly works. According to George's suggestion, i > will take a look to the Queue module. > One question about > > for mythread in mythreads:# for all threads > mythread.join()

Re: collecting results in threading app

2008-04-04 Thread Gerardo Herzig
John Nagle wrote: >Gerardo Herzig wrote: > > >>Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant >>figure out which one. >> >>This little peace of code executes a 'select count(*)' over every table >>in a database, one thread per table: >> >>class TableCounter(threading

Re: collecting results in threading app

2008-04-04 Thread George Sakkis
On Apr 4, 10:42 am, Gerardo Herzig <[EMAIL PROTECTED]> wrote: > Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant > figure out which one. > > This little peace of code executes a 'select count(*)' over every table > in a database, one thread per table: > > class TableCount

Re: collecting results in threading app

2008-04-04 Thread John Nagle
Gerardo Herzig wrote: > Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant > figure out which one. > > This little peace of code executes a 'select count(*)' over every table > in a database, one thread per table: > > class TableCounter(threading.Thread): >def __init_

collecting results in threading app

2008-04-04 Thread Gerardo Herzig
Hi all. [EMAIL PROTECTED] over here. Im missing some point here, but cant figure out which one. This little peace of code executes a 'select count(*)' over every table in a database, one thread per table: class TableCounter(threading.Thread): def __init__(self, conn, table): self.co