Skip to content
Commit eddb7c6e authored by Eric Jiang's avatar Eric Jiang Committed by Julius Künzel
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 2b153d1c
Pipeline #262263 failed with stage
in 25 minutes and 41 seconds
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