[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multithread and locking issue

On 2020-05-15, Chris Angelico <rosuav at gmail.com> wrote:

> Seconded. If you know how many threads you're going to have, just open
> that many connections. If not, there's a connection-pooling feature as
> part of psycopg2 (if I'm not mistaken). This would be far far easier
> to work with than a fragile queueing setup.

I've done like that (more or less), it works fine.

I note that que queuing module or Python is "fragile".