Mercurial > cpython-lru_cache-weakref
diff Modules/_sqlite/cursor.c @ 49155:76bc75772736 legacy-trunk
Issue #3846: Release GIL during calls to sqlite3_prepare. This improves concurrent access to the same database file from multiple threads/processes.
| author | Gerhard Häring <gh@ghaering.de> |
|---|---|
| date | Fri, 12 Sep 2008 22:33:22 +0000 |
| parents | 4c77d1016f60 |
| children | 787b969d37f0 04d3ae52ff73 |
line wrap: on
line diff
--- a/Modules/_sqlite/cursor.c Fri Sep 12 18:58:57 2008 +0000 +++ b/Modules/_sqlite/cursor.c Fri Sep 12 22:33:22 2008 +0000 @@ -790,11 +790,13 @@ } statement_completed = 1; + Py_BEGIN_ALLOW_THREADS rc = sqlite3_prepare(self->connection->db, script_cstr, -1, &statement, &script_cstr); + Py_END_ALLOW_THREADS if (rc != SQLITE_OK) { _pysqlite_seterror(self->connection->db, NULL); goto error;
