hydroflask <hydrofl...@yqxmail.com> added the comment:

>> The major problem is that I don't exactly know how to provoke SQLite to
>> acquire an internal lock.

> IIRC, you can provoke the internal SQLite lock simply by using transaction 
> control: BEGIN (lock) => COMMIT / ROLLBACK (unlock).

Ah okay, so the sequence would have to be this:

thread1: pysqlite.some_operation()
thread1: release gil
thread1: sqlite3_some_procedure()
thread1: acquire sqlite lock
<switch threads>
thread2: acquire gil
thread2: pysqlite.close()
thread2: sqlite3_close()
thread2: acquire sqlite lock

> I'll see if I can come up with a compact repro.

It should be possible, good luck!

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42698>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to