Magnus Lycka wrote:
> Antal Rutz wrote:
>
>>Hi, All!
>>
>>I'm new to threading. I have some design questions:
>>Task: I collect data and store them in an RDBMS (mysql or pgsql)
>>
>>The question is how to do that with threading?
>>The data-collecting piece of the code runs in a thread.
>>
>>1. Ope
Antal Rutz wrote:
> Hi, All!
>
> I'm new to threading. I have some design questions:
> Task: I collect data and store them in an RDBMS (mysql or pgsql)
>
> The question is how to do that with threading?
> The data-collecting piece of the code runs in a thread.
>
> 1. Open the db, and each thread
For threading I use usually this recipe as a base:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448, I think
you can use it for your purpose as well.
--
http://mail.python.org/mailman/listinfo/python-list
Just an idea: You could have n data collector threads, that all put their
results into a queue connected to 1 db thread, that stores the results into
the db.
Cheers
Franz GEIGER
"Antal Rutz" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Hi, All!
>
> I'm new to threading. I
Hi, All!
I'm new to threading. I have some design questions:
Task: I collect data and store them in an RDBMS (mysql or pgsql)
The question is how to do that with threading?
The data-collecting piece of the code runs in a thread.
1. Open the db, and each thread writes the result immediately.
(