# \#isolation

**URL:** https://forums.swift.org/tag/isolation/1088.md

[Latest](https://forums.swift.org/latest.md) · [Categories](https://forums.swift.org/categories.md) · [Tags](https://forums.swift.org/tags.md)

---

## [Airlock](https://forums.swift.org/t/airlock/87737)

<div class="topic-metadata">

**Author:** [@MaksymKotliar](https://forums.swift.org/u/MaksymKotliar)\
**Replies:** 3\
**Last updated:** [June 29, 2026, 5:21pm UTC](https://forums.swift.org/t/airlock/87737 "2026-06-29T17:21:28Z")

</div>

About Airlock Project page: GitHub - MaximKotliar/Airlock: macOS fork-based process isolation for Swift · GitHub There's no try you can wrap around a segfault. When a parser walks off the end of an attacker-controlled b…

---

## [Isolated closures and @concurrent functions](https://forums.swift.org/t/isolated-closures-and-concurrent-functions/86614)

<div class="topic-metadata">

**Author:** [@NotTheNHK](https://forums.swift.org/u/NotTheNHK)\
**Replies:** 12\
**Last updated:** [May 13, 2026, 10:16am UTC](https://forums.swift.org/t/isolated-closures-and-concurrent-functions/86614 "2026-05-13T10:16:25Z")

</div>

Recently, I had isolated closures in mind and how they interact with non-isolated asynchronous functions (@concurrent), and found that the compiler naively determines that sending the closure (value) to a different isola…

---

## [Synthesized Bundle.module is not usable in nonisolated code in packages with MainActor default isolation](https://forums.swift.org/t/synthesized-bundle-module-is-not-usable-in-nonisolated-code-in-packages-with-mainactor-default-isolation/84416)

<div class="topic-metadata">

**Author:** [@marco.masser](https://forums.swift.org/u/marco.masser)\
**Replies:** 10\
**Last updated:** [March 31, 2026, 1:14pm UTC](https://forums.swift.org/t/synthesized-bundle-module-is-not-usable-in-nonisolated-code-in-packages-with-mainactor-default-isolation/84416 "2026-03-31T13:14:47Z")

</div>

I have a Swift package where the Package.swift file defines .defaultIsolation(MainActor.self) for my library target because it mostly contains view-level code. The Bundle.module that is automatically synthesized by SPM i…

---

## [Allow closure to be statically isolated to a weakly captured actor](https://forums.swift.org/t/allow-closure-to-be-statically-isolated-to-a-weakly-captured-actor/85451)

<div class="topic-metadata">

**Author:** [@jeremyabannister](https://forums.swift.org/u/jeremyabannister)\
**Replies:** 15\
**Last updated:** [March 25, 2026, 12:40am UTC](https://forums.swift.org/t/allow-closure-to-be-statically-isolated-to-a-weakly-captured-actor/85451 "2026-03-25T00:40:53Z")

</div>

Right now, you can write an API that allows an actor to call it and pass in a closure that is statically isolated to the calling actor: final class Foo { func onWrite(\_ callback: @escaping () async -\> ()) { …

---

## [Inference of isolated conformances](https://forums.swift.org/t/inference-of-isolated-conformances/84468)

<div class="topic-metadata">

**Author:** [@Nickolas\_Pohilets](https://forums.swift.org/u/Nickolas_Pohilets)\
**Replies:** 4\
**Last updated:** [January 30, 2026, 5:27pm UTC](https://forums.swift.org/t/inference-of-isolated-conformances/84468 "2026-01-30T17:27:01Z")

</div>

The following code works fine without InferIsolatedConformances (with all conformances being nonisolated), but breaks under InferIsolatedConformances (S: P and S: R are inferred as isolated, but S: Q as nonisolated). pr…

---

## [Difference between \`nonisolated(nonsending)\` function and \`isolation: isolated (any Actor)? = #isolation\` parameter](https://forums.swift.org/t/difference-between-nonisolated-nonsending-function-and-isolation-isolated-any-actor-isolation-parameter/83722)

<div class="topic-metadata">

**Author:** [@alessionossa](https://forums.swift.org/u/alessionossa)\
**Replies:** 1\
**Last updated:** [December 16, 2025, 11:20am UTC](https://forums.swift.org/t/difference-between-nonisolated-nonsending-function-and-isolation-isolated-any-actor-isolation-parameter/83722 "2025-12-16T11:20:50Z")

</div>

SE-0420 - Inheritance of actor isolation introduces the possibility of inherit actor isolation of he caller with the syntax func foo(isolation: isolated (any Actor)? = #isolation) async while SE-0461 - Run nonisolated …

---

## [\[Pitch\] Improve diagnostic when attempting to send "task-isolated" value](https://forums.swift.org/t/pitch-improve-diagnostic-when-attempting-to-send-task-isolated-value/82915)

<div class="topic-metadata">

**Author:** [@jeremyabannister](https://forums.swift.org/u/jeremyabannister)\
**Replies:** 3\
**Last updated:** [November 5, 2025, 2:32am UTC](https://forums.swift.org/t/pitch-improve-diagnostic-when-attempting-to-send-task-isolated-value/82915 "2025-11-05T02:32:08Z")

</div>

It can be very surprising when code which was previously compiling is suddenly failing with an error like: Task-isolated 'foo' is passed as a 'sending' parameter; Uses in callee may race with later task-isolated uses o…

---

## [\`#isolation\` not providing the correct Actor in closures when NonisolatedNonsendingByDefault is enabled?](https://forums.swift.org/t/isolation-not-providing-the-correct-actor-in-closures-when-nonisolatednonsendingbydefault-is-enabled/81924)

<div class="topic-metadata">

**Author:** [@Serika\_PHB](https://forums.swift.org/u/Serika_PHB)\
**Replies:** 3\
**Last updated:** [September 9, 2025, 2:05pm UTC](https://forums.swift.org/t/isolation-not-providing-the-correct-actor-in-closures-when-nonisolatednonsendingbydefault-is-enabled/81924 "2025-09-09T14:05:11Z")

</div>

In the following example, with NonisolatedNonsendingByDefault enabled, the closure passed to a.test() should be executed on actor a. The code does pass the a.assertIsolated() assertion successfully. However, when I try t…

---

## [A few @isolated(any) function conversion questions](https://forums.swift.org/t/a-few-isolated-any-function-conversion-questions/79279)

<div class="topic-metadata">

**Author:** [@jamieQ](https://forums.swift.org/u/jamieQ)\
**Replies:** 1\
**Last updated:** [May 2, 2025, 12:16am UTC](https://forums.swift.org/t/a-few-isolated-any-function-conversion-questions/79279 "2025-05-02T00:16:42Z")

</div>

inspired by the discussion surfaced here, i wanted to highlight some of the specific language regarding @isolated(any) function conversions from the relevant evolution document. focusing on the third bullet point from th…

---

## [Closure Isolation Inheritance Issues](https://forums.swift.org/t/closure-isolation-inheritance-issues/78703)

<div class="topic-metadata">

**Author:** [@eli](https://forums.swift.org/u/eli)\
**Replies:** 0\
**Last updated:** [March 21, 2025, 12:19am UTC](https://forums.swift.org/t/closure-isolation-inheritance-issues/78703 "2025-03-21T00:19:35Z")

</div>

Hello, Im trying to create a Queue, which allows me to synchronise execution despite having a reentry point. Doing the above I ran into few problems. Basically I have a simple actor public typealias RoutingQueueOperat…

---

## [PostgresKit: No way to set transaction Isolation level?](https://forums.swift.org/t/postgreskit-no-way-to-set-transaction-isolation-level/78033)

<div class="topic-metadata">

**Author:** [@kwiky](https://forums.swift.org/u/kwiky)\
**Replies:** 0\
**Last updated:** [February 22, 2025, 3:31pm UTC](https://forums.swift.org/t/postgreskit-no-way-to-set-transaction-isolation-level/78033 "2025-02-22T15:31:35Z")

</div>

I’ve browsed the PostgresKit documentation and haven’t found any built-in API that lets you directly set the transaction isolation level. I’ve looked for a transaction method with an isolation parameter—something like tr…
