Psycopg and threads problem

Istvan Albert ialbert at mailblocks.com
Mon Sep 20 12:24:20 EDT 2004


Istvan Albert wrote:

> have a commit at the end of your insert threads. That way
> when all the inserts are finished the data will be available
> for the combine thread.

I forgot this, if the commit after insert is unfeasible
you could store the db connections in a data structure shared across threads
and if/when all the insert threads complete without errors you can call commit
on each of these before the combine thread.

Sounds a bit hackish though, just an idea.

Istvan.



More information about the Python-list mailing list