use asynchronous worker termination
instead of waiting until all threads have joined, we are now supplying a callback that will be invoked once all threads have terminated. you can use this callback to free the worker struct
This commit is contained in:
@@ -39,8 +39,9 @@ SQLiteStore::~SQLiteStore() {
|
||||
// Nothing to do. This function needs to be here because we're forward-declaring
|
||||
// Database, so we need the actual definition here to be able to properly destruct it.
|
||||
if (worker) {
|
||||
uv_worker_close(worker);
|
||||
delete worker;
|
||||
uv_worker_close(worker, [](uv_worker_t *worker) {
|
||||
delete worker;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user