database: flip to recursive_mutex to allow nested locks (#1937)

* Fix crash from db locking

* Change db lock to use recursive_mutex
This commit is contained in:
Corey D
2023-03-29 20:03:03 -07:00
committed by GitHub
parent 5ba9816377
commit c5087d7a39
4 changed files with 7 additions and 3 deletions
+4
View File
@@ -959,6 +959,10 @@ native bool SQL_Execute(Handle statement);
* If the lock cannot be acquired, the main thread will pause until the
* threaded operation has concluded.
*
* Care should be taken to not lock an already-locked database. Internally,
* lock calls are nested recursively and must be paired with an equal amount
* of unlocks to be undone. This behaviour should not be relied on.
*
* @param database A database Handle.
* @error Invalid database Handle.
*/