kynikos / outspline

Extensible outliner and personal time organizer to manage todo lists, schedule tasks, remind events.
http://kynikos.github.io/outspline/
GNU General Public License v3.0
47 stars 9 forks source link

Pass connection to database between functions instead of blocking it #286

Open kynikos opened 10 years ago

kynikos commented 10 years ago

Passing the connection to the database as a parameter between functions may be a simpler way to protect from race conditions, instead of the current DBProtection class.

kynikos commented 10 years ago

Also update the related STYLE rule.

kynikos commented 10 years ago

Or even better re-implement everything putting the actions on a Queue and processing them in the core on a dedicated thread that handles the databate connection internally.

kynikos commented 10 years ago

Then a new panel could be added to the logs, to display the ongoing and queued actions (and maybe let cancel them?) See also #208

kynikos commented 10 years ago

If all queries are done in a dedicated thread, remove the check_same_thread=False flag from sqlite3.connect in core.databases.MemoryDB and core.databases.Database.