CJob: Even cancel finished jobs
When a job was cancelled after its runThread() method finished, but before the main thread noticed this and reacted, we would just run runMain() before and pretend the job finished normally. However, with CModuleJob this means that runMain() might get called for a module which is currently being destructed. This has bad effects with virtual functions and thus causes problems. It's better to just really cancel the job instead. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
1 parent
5a6224d2b4
commit
74fdd97a52
2 files changed
+7
-3
No files matched your search
+1
-1
@@ -154,7 +154,7 @@ public:
|
||||
}
|
||||
|
||||
~CEmptyJob() {
|
||||
EXPECT_FALSE(wasCancelled());
|
||||
EXPECT_TRUE(wasCancelled());
|
||||
m_bDestroyed = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user