ThreadManager: Protect against teardown hang/leak.

Make sure we lock during canceled checks/updates, and also try to free
tasks queued on threads that didn't end up running.
This commit is contained in:
Unknown W. Brackets committed 2021-11-27 08:57:19 -08:00
1 parent de9a4dcede
commit 12b790bb81
2 files changed
+54 -8

No files matched your search

+2
View File
@@ -60,6 +60,8 @@ public:
int GetNumLooperThreads() const;
private:
bool TeardownTask(Task *task, bool enqueue);
// This is always pointing to a context, initialized in the constructor.
GlobalThreadContext *global_;