Intermediate Swift
Q88 / 100

What is Swift's TaskLocal?

Correct! Well done.

Incorrect.

The correct answer is B) A property wrapper for values implicitly propagated through the structured concurrency tree, providing task-scoped storage

B

Correct Answer

A property wrapper for values implicitly propagated through the structured concurrency tree, providing task-scoped storage

Explanation

@TaskLocal static var requestId: String = ""; TaskLocal.$requestId.withValue("req-1") { await handler() } propagates requestId through all child tasks.

Progress
88/100