fix bug that prevented db being written to disk in SingleWriter mode
authorJoey Hess <joeyh@joeyh.name>
Mon, 18 Sep 2017 23:42:20 +0000 (19:42 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 18 Sep 2017 23:42:20 +0000 (19:42 -0400)
commit5f9eff3f32e0101ee673c3dde221f0f27f32e3c8
tree2fa7e6a3c4a7ad0ee7aa14b0288c580ed2bd8e8c
parentc35fd698aa35235142e6f8ed0dd1e1a9964aab54
fix bug that prevented db being written to disk in SingleWriter mode

The bug occurred when closeDb was not called, and garbage collection of
the DbHandle didn't give the workerThread time to shut down. Fixed by
exiting the runSqlite action when a commit is made.

(MultiWriter mode already forked off a runSqlite action, so avoided the
problem.)

This commit was sponsored by Brock Spratlen on Patreon.
Database/Handle.hs
doc/todo/export.mdwn