omnilib / aiosqlite

asyncio bridge to the standard sqlite3 module
https://aiosqlite.omnilib.dev
MIT License
1.22k stars 94 forks source link

Add `daemonic` option #308

Open smanolloff opened 2 weeks ago

smanolloff commented 2 weeks ago

Description

Normally, the Connection thread prevents program exit unless close() is explicitly called. This is no longer the case if the new deaemonic option is set to True.

It defaults to False which means aiosqlite's behaviour remains unaffected unless explicitly configured.

This PR would also address issues which have been opened for some time now.

Fixes: https://github.com/omnilib/aiosqlite/issues/74, https://github.com/omnilib/aiosqlite/issues/299