MySQLDB multiple cursor question

AdSR artur_spruce at yahoo.com
Thu Jan 8 20:32:23 CET 2004


Brian Kelley <bkelley at wi.mit.edu> wrote:
> Brian Kelley wrote:
> > I am trying to use threads and mysqldb to retrieve data from multiple 
> > asynchronous queries.
> > 
> > My basic strategy is as follows, create two cursors, attach them to the 
> > appropriate databases and then spawn worker functions to execute sql 
> > queries and process the results.
> 
> The problem goes away if I have only one cursor per connection and just 
> use multiple connections.  This seems like a bug but I don't know for sure.
> 
> Brian

See PEP 249, read about the "threadsafety" global variable.

HTH,

AdSR



More information about the Python-list mailing list