# Unable to send closure with an isolated parameter

**URL:** <https://forums.swift.org/t/unable-to-send-closure-with-an-isolated-parameter/73772>\
**Category:** Using Swift\
**Tags:** concurrency\
**Created:** [August 7, 2024, 3:15pm UTC](https://forums.swift.org/t/unable-to-send-closure-with-an-isolated-parameter/73772 "2024-08-07T15:15:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mattie](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/mattie/32/13267_2.png) [@mattie](https://forums.swift.org/u/mattie)\
**Post date:** [August 7, 2024, 3:27pm UTC](https://forums.swift.org/t/unable-to-send-closure-with-an-isolated-parameter/73772/3 "2024-08-07T15:27:54Z")

</div>

Ahh, of course! Without the changes from [Closure isolation control](https://forums.swift.org/t/closure-isolation-control/70378), I have to be really careful about how isolation is inherited within that `Task`.

Here's the solution:

```swift
	func notOk(isolation: isolated (any Actor)? = #isolation) {
		let op = {
			print(self.value)
		}

		Task {
			_ = isolation // this is critical to get the correct inheritance
			op()
		}
	}

```

---

_[View the full topic](https://forums.swift.org/t/unable-to-send-closure-with-an-isolated-parameter/73772)._
