connection timeout parameter

Bryan <[email protected]>
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
i seem to be having the same issue as was posted in a previous thread 
"timeout parameter".  i'm using pysqlite 2.3.2 and python 2.4.3 on 
windows xp sp2.

i have a method that does the following:
     get new connection
         (timeout is 30 seconds, isolation_level is default)
     get new cursor
     insert
     sleep 30 seconds
     commit


the method is called in two threads.  when the 2nd thread tries to do an 
insert, it returns immediately with a "DatabaseError: database is 
locked" exception.   i expected the 2nd call to insert to be blocked for 
up to 30 seconds (i also tried the default timeout of 5 seconds). it 
seems that the connection timeout values is being ignored.  is this a 
bug or is there a work around for this?

thanks,

bryan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.