Maybe we can change this to `= (state != TaskState.KILLED)` to make it clearer