add cancellation checks in continuations