MySQLdb and threads

Gillou nospam at bigfoot.com
Tue Nov 5 10:39:47 EST 2002


Great,

Many thanks Piet...
Looking for "pool python" or "pool mysql" didn't help.

--Gilles

"Piet van Oostrum" <piet at cs.uu.nl> a écrit dans le message de news:
wziszcvz6s.fsf at localhost.cs.uu.nl...
> >>>>> "Gillou" <nospam at bigfoot.com> (G) writes:
>
> >> >>>>> "Gillou" <nospam at bigfoot.com> (G) writes:
> >>
> G> Hi,
> G> I plan to make SQL queries in different threads of an application using
> G> MySQLdb.
> G> Can I use the same Connection object in all threads (each thread having
> G> its
> G> own cursor) for the queries ? Or should I use a different Connection
> G> object
> G> for each thread ?
> >>
> >> The doc says:
> >>
>
> G> [SNIP]
>
> >> For threaded applications, try using a connection pool. This can be
done
> >> using the Pool module.
>
> G> Many thanks Piet for this enlightenment,
>
> G> Where did you find the Pool module you're writing of ?
>
> I just copied the doc.
>
> G> I didn't find it in the standard Python distro (2.1.3) nor with google.
>
> Google gives me:
> http://dustman.net/andy/python/Pool
> --
> Piet van Oostrum <piet at cs.uu.nl>
> URL: http://www.cs.uu.nl/~piet [PGP]
> Private email: P.van.Oostrum at hccnet.nl





More information about the Python-list mailing list