Skip to content

Commit 8bcbce5

Browse files
committed
also always remove from parent on cancel and active parent on cancel no matter what. State will block this action if fired at the wrong time
1 parent 72f5ef3 commit 8bcbce5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • src/main/kotlin/com/lambda/task

src/main/kotlin/com/lambda/task/Task.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ abstract class Task<Result> : Nameable, Muteable {
204204
unsubscribe()
205205
runSafe { onCancel() }
206206
cancelSubTasks()
207-
if (removeFromParent) parent?.subTasks?.remove(this)
208-
if (parentPausing) parent?.activate()
207+
parent?.subTasks?.remove(this)
208+
parent?.activate()
209209
if (this is RootTask) return
210210
if (state == State.Completed || state == State.Cancelled) return
211211
state = State.Cancelled

0 commit comments

Comments
 (0)