Psycopg and threads problem

Istvan Albert ialbert at
Mon Sep 20 18:24:20 CEST 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.


More information about the Python-list mailing list