Avatar
withTaskCancellationHandler、キャンセル状態でこれに入ったら先にキャンセルしてから中が実行される
2:18 AM
/// ### Already cancelled tasks /// When `withTaskCancellationHandler` is used in a `Task` that has already been cancelled, /// the `onCancel` cancellation ``handler`` will be executed immediately before operation gets /// to execute. This allows the cancellation handler to set some external "cancelled" flag that the /// operation may be *atomically* checking for in order to avoid performing any actual work once /// the operation gets to run.
2:18 AM
コード中コメントにも書いてあった