don't cancel subtasks on task destructor

This commit is contained in:
HJfod 2024-07-29 15:15:00 +03:00
parent 2a3c35f584
commit 4b4bc0eb9b

View file

@ -163,9 +163,12 @@ namespace geode {
m_status = Status::Cancelled; m_status = Status::Cancelled;
// If this task carries extra data, call the extra data's // If this task carries extra data, call the extra data's
// handling method // handling method
if (m_extraData) { // Actually: don't do this! This will cancel tasks even if
m_extraData->cancel(); // they have other listeners! The extra data's destructor
} // will handle cancellation if it has no other listeners!
// if (m_extraData) {
// m_extraData->cancel();
// }
// No need to actually post an event because this Task is // No need to actually post an event because this Task is
// unlisteanable // unlisteanable
m_finalEventPosted = true; m_finalEventPosted = true;