# Automatically Cancelling Continuations

**URL:** <https://forums.swift.org/t/automatically-cancelling-continuations/72960>\
**Category:** Using Swift\
**Tags:** concurrency, continuation, cancellation, concepts\
**Created:** [July 5, 2024, 3:37pm UTC](https://forums.swift.org/t/automatically-cancelling-continuations/72960 "2024-07-05T15:37:39Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![nikolai.ruhe](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nikolai.ruhe/32/23230_2.png) [@nikolai.ruhe](https://forums.swift.org/u/nikolai.ruhe)\
**Post date:** [July 11, 2024, 1:44pm UTC](https://forums.swift.org/t/automatically-cancelling-continuations/72960/12 "2024-07-11T13:44:18Z")

</div>

Good to see that you came to a similar implementation.

I like the explicit cancellation handler. In my use cases it's not really needed because cancellation would resume the continuation and the code following the await handles all situations similarly. But it's nice to have access to it in the closure when setting up an unstructured task like this.

---

_[View the full topic](https://forums.swift.org/t/automatically-cancelling-continuations/72960)._
