MySQLdb and threads
Piet van Oostrum
piet at cs.uu.nl
Tue Nov 5 10:00:43 EST 2002
>>>>> "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