Skip to content
Commit fced1a0b authored by Eric Jiang's avatar Eric Jiang Committed by Jean-Baptiste Mardelle
Browse files

Auto-call taskManager.taskDone() when run() ends

Create AbstractTaskDone at the beginning of run() so that it is
destroyed when it goes out of scope (i.e. run() finishes). When
AbstractTaskDone is destroyed, it calls

pCore->taskManager.taskDone(...)

so that we don't need to manually insert calls to taskDone() before
every return statement. By calling it at the very end of the function,
we ensure that taskDone() is not called too early, which can delete the
AbstractTask before it actually finishes.
parent 8588b948
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment