Skip to content

Commit 98ae2b0

Browse files
committed
1 parent ff59240 commit 98ae2b0

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/connection.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5567,7 +5567,10 @@ Connection_setlk_timeout(PyObject *self_, PyObject *const *fast_args, Py_ssize_t
55675567
ARG_EPILOG(NULL, Connection_setlk_timeout_USAGE, );
55685568
}
55695569

5570+
DBMUTEX_ENSURE(self->dbmutex);
55705571
int res = sqlite3_setlk_timeout(self->db, ms, flags);
5572+
sqlite3_mutex_leave(self->dbmutex);
5573+
55715574
SET_EXC(res, NULL);
55725575
if(PyErr_Occurred())
55735576
return NULL;

tools/gensqlitedebug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@
115115
"sqlite3_open_v2",
116116
"sqlite3_randomness",
117117
"sqlite3_release_memory",
118-
"sqlite3_setlk_timeout", # operates on db, but does not take a mutex
119118
"sqlite3_shutdown",
120119
"sqlite3_sleep",
121120
"sqlite3_soft_heap_limit64",
@@ -225,6 +224,7 @@
225224
"sqlite3_update_hook",
226225
"sqlite3_vtab_config",
227226
"sqlite3_wal_hook",
227+
"sqlite3_setlk_timeout",
228228
),
229229
4: (
230230
"sqlite3_autovacuum_pages",

0 commit comments

Comments
 (0)