3 ms·
Yes, just like you can already access it from multiple threads in the same interpreter right now.
by remram 4y ago
Yes, just like you can already access it from multiple threads in the same interpreter right now.
- RantyDave 4y agoSo, is the GIL released when the thread goes to SQLite? Is the behaviour dependent on how the interfacing between Python and C is written?
- remram 4y agoYes, it is released [1]. This allows you to access it from multiple thread in the same interpreter though, so I still don't understand robertlagrant's question. [1]: https://github.com/python/cpython/blob/4b81139aac3fa11779f6eedb6e621bde29e64b30/Modules/_sqlite/cursor.c#L518-L520 https://github.com/python/cpython/blob/4b81139aac3fa11779f6e...
- robertlagrant 4y ago> Yes, just like you can already access it from multiple threads in the same interpreter right now. Yes, but doesn't the GIL currently serialise things?
- remram 4y agoThe GIL serializes all the things you can do in Python... I am not sure I understand the question to be honest.
- robertlagrant 4y agoWith the new multi-GIL I wonder how different concurrent GILs will work against the same sqlite database.
- remram 4y agoI see. It will give you the same performance as using a single SQLite database from different processes now. Note that SQLite limits access to 1 writer at a time though.