Menu

Can I detect locked tables?

2002-08-16
2012-09-19
  • Skip Montanaro

    Skip Montanaro - 2002-08-16

    From one thread I might execute

        c.execute("LOCK TABLE ...")

    Is it possible to tell in advance from another thread that a particular table has been locked and what type of lock is held?

     
    • Andy Dustman

      Andy Dustman - 2002-08-16

      There's no way that I know of either using SQL or the C API. Even if there was, some other thread could grab the lock immediately after your test. OTOH, you can create a mutex on the Python side of things (thread.lock), in your application, but the same comments apply.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.