# Distinction between \`@isolated(any)\` and \`@\_inheritActorContext\`

**URL:** <https://forums.swift.org/t/distinction-between-isolated-any-and-inheritactorcontext/75730>\
**Category:** Discussion\
**Tags:** concurrency\
**Created:** [October 31, 2024, 1:07pm UTC](https://forums.swift.org/t/distinction-between-isolated-any-and-inheritactorcontext/75730 "2024-10-31T13:07:42Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![nonameplum](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/nonameplum/32/6450_2.png) [@nonameplum](https://forums.swift.org/u/nonameplum)\
**Post date:** [October 7, 2025, 6:27pm UTC](https://forums.swift.org/t/distinction-between-isolated-any-and-inheritactorcontext/75730/13 "2025-10-07T18:27:31Z")

</div>

For anyone interested, I created [GitHub - nonameplum/AsyncLifetime: Automatic lifetime management for Swift async sequences. Prevents retain cycles and ensures proper cleanup.](https://github.com/nonameplum/AsyncLifetime) with this free function `withLifetime` with extensive unit tests that show different behaviors with isolation inheritance/context/etc + differences between Swift 6.2 vs \<6.2.

The package exposes as public api only the version that returns cancellable, similarly to Combine, to prevent wrong usage which might happen in edge cases mentioned in the repo and unit tests.

---

_[View the full topic](https://forums.swift.org/t/distinction-between-isolated-any-and-inheritactorcontext/75730)._
