Close thread pool if present in Geary.Database dtor
Fixes running unit tests on a single CPU host.
This commit is contained in:
parent
2c01d032db
commit
92bca47d43
1 changed files with 3 additions and 3 deletions
|
|
@ -84,9 +84,9 @@ public class Geary.Db.Database : Geary.Db.Context {
|
|||
}
|
||||
|
||||
~Database() {
|
||||
// Not thrilled about using lock in a dtor
|
||||
lock (outstanding_async_jobs) {
|
||||
assert(outstanding_async_jobs == 0);
|
||||
// Not thrilled about long-running tasks in a dtor
|
||||
if (this.thread_pool != null) {
|
||||
GLib.ThreadPool.free((owned) this.thread_pool, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue