Advanced Swift
Q93 / 100

What is the Sendable checking and actor-isolated closure interaction?

Correct! Well done.

Incorrect.

The correct answer is B) A @Sendable closure cannot capture non-Sendable actor-isolated state; the compiler prevents data races by ensuring closures only cross actor boundaries with Sendable data

B

Correct Answer

A @Sendable closure cannot capture non-Sendable actor-isolated state; the compiler prevents data races by ensuring closures only cross actor boundaries with Sendable data

Explanation

Task { @Sendable in nonSendableCapture } fails. The compiler requires that values crossing actor/task boundaries are Sendable to prevent data races.

Progress
93/100