[odb-users] Mutex may not be released Re: It was blocked by odb::sqlite::connection_pool_factory::create()

Sunny Sun sunny.sun at ringcentral.com
Tue Jun 18 22:21:09 EDT 2024


Hi,I noticed the following code snippet:

signal ()
    {



      if (waiters_ > signals_)
      {
        if (signals_++ == 0)
        {
          if (SetEvent (event_) == 0)
            throw win32_exception ();
        }
      }


      mutex_.unlock ();
    }


If it throw win32_exception(), it will not unlock mutex.
It’s not reasonable.

Looking forward to your reply.
Thank you very much.


On May 27, 2024, at 17:38, Sunny Sun <sunny.sun at ringcentral.com> wrote:

Hi Boris,

We encountered a problem that was the thread was blocked by odb::sqlite::connection_pool_factory::create().

We created a new db file with odb::sqlite::database, then we call db->schema_version() which will call odb::sqlite::connection_pool_factory::create().

But it was blocked.

What I want to know is:

1. What will cause this block?

2. How to avoid this block?

2. Is there any approach to recover from the block?


We use ODB 2.4.0 and sqlite.

If you need more information, please let me know.

Thank you very much.





More information about the odb-users mailing list