Run the finalizers now, from inside the body, while the lease is still held.
WHY: cleanup that files the run's results then runs in the body's own async context,
and resolves before the body's caller continues.
It waits for a started execution, then decides the end from it: failed (cancellation
included), paused or completed. Calling it is the body's word that its own part did not
fail; a body that throws afterwards still rejects withRun, but the end stays as given.
Once only: a second call shares the first. Rejects with the first cleanup failure unless
the run paused. Afterwards execute and onFinalize refuse; withRun finalizes nothing again.
Run the finalizers now, from inside the body, while the lease is still held. WHY: cleanup that files the run's results then runs in the body's own async context, and resolves before the body's caller continues. It waits for a started execution, then decides the end from it: failed (cancellation included), paused or completed. Calling it is the body's word that its own part did not fail; a body that throws afterwards still rejects
withRun, but the end stays as given. Once only: a second call shares the first. Rejects with the first cleanup failure unless the run paused. AfterwardsexecuteandonFinalizerefuse;withRunfinalizes nothing again.