Fix shutdown when no worker tasks have been used.
This commit is contained in:
parent
76882b3bd7
commit
3dbdc90927
|
@ -1256,8 +1256,10 @@ static ~this()
|
||||||
if (is_main_thread) {
|
if (is_main_thread) {
|
||||||
shared(TaskPool) tpool;
|
shared(TaskPool) tpool;
|
||||||
synchronized (st_threadsMutex) swap(tpool, st_workerPool);
|
synchronized (st_threadsMutex) swap(tpool, st_workerPool);
|
||||||
logDiagnostic("Main thread still waiting for worker threads.");
|
if (tpool) {
|
||||||
tpool.terminate();
|
logDiagnostic("Main thread still waiting for worker threads.");
|
||||||
|
tpool.terminate();
|
||||||
|
}
|
||||||
logDiagnostic("Main thread exiting");
|
logDiagnostic("Main thread exiting");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue