mirror of
https://codeberg.org/cage/tinmop/
synced 2025-01-22 03:25:41 +01:00
- prevented a race condition occurring when accessing the database on program quit.
This commit is contained in:
parent
a1cf6de9da
commit
0a3d7baa9d
@ -55,12 +55,12 @@
|
|||||||
(defun clean-close-program ()
|
(defun clean-close-program ()
|
||||||
"Use this to close the program"
|
"Use this to close the program"
|
||||||
(flet ((on-input-complete (maybe-accepted)
|
(flet ((on-input-complete (maybe-accepted)
|
||||||
(when (boolean-input-accepted-p maybe-accepted)
|
(if (boolean-input-accepted-p maybe-accepted)
|
||||||
(let ((delete-event (make-instance 'delete-all-status-event)))
|
(let ((delete-event (make-instance 'delete-all-status-event)))
|
||||||
(push-event delete-event)))
|
(push-event delete-event))
|
||||||
(db-utils:with-ready-database (:connect nil)
|
(db-utils:with-ready-database (:connect nil)
|
||||||
(db:renumber-all-timelines '())
|
(db:renumber-all-timelines '())))
|
||||||
(clean-temporary-files))))
|
(clean-temporary-files)))
|
||||||
(let ((delete-count (db:count-status-marked-to-delete))
|
(let ((delete-count (db:count-status-marked-to-delete))
|
||||||
(stop-download-event (make-instance 'gemini-abort-all-downloading-event
|
(stop-download-event (make-instance 'gemini-abort-all-downloading-event
|
||||||
:priority +maximum-event-priority+)))
|
:priority +maximum-event-priority+)))
|
||||||
|
Loading…
Reference in New Issue
Block a user