heldCancel property
The cancellation an open section is holding back, or null.
Set when a cancellation the job may refuse arrives inside a section opened
by enterUncancellable, and cleared when the outermost section closes and
lets it through. The job does not accept it meanwhile — pendingCancel
stays null — so this, and JobContext.heldCancellation for the body,
are the only places such a request shows.
A cancellation the job cannot refuse is not held: the job accepts it at once, and the one held until then is dropped and cleared here. So is one a section the body walked away from still holds when the body cancels itself or the job ends: it would land on a job already cancelled or over. And so is the request of the job's own deadline once the body and the children are over: the deadline ends there, and a rejectable request that arrived behind it shows here in its place.
See Holding the cancellation back on the cancellation page.
Implementation
@protected
Cancelled? get heldCancel => _heldCancel;