How aiosqlite handles concurrency
mainaiosqlite allows interaction with SQLite databases on the main AsyncIO event loop without blocking other coroutines.
Mechanism:
- It uses a single, shared thread per connection.
- This thread executes all actions within a shared request queue to prevent overlapping actions.
- Connection objects act as proxies to real connections and contain the shared execution thread.
- Cursors act as proxies to real cursors and provide async iterators for query results.