Open netural-philipp-gabriel opened 1 week ago
relevant forum post: https://forums.swift.org/t/new-task-creation-apis/74322
Hmm, not even capturing the closure as nonisolated(unsafe)
seems to be working. I am getting the feeling I am holding it wrong. I pretty much just copied the parameter as it is used in TaskGroup.addTask
😕.
Description
The compiler produces an error when passing a
sending
closure to aTaskGroup
. However if you pass the same closure to aTask
this error does not pop up, which makes me think thatTaskGroup
s behavior is not correct.Reproduction
Expected behavior
No compiler error.
Environment
Apple Swift version 6.0-dev (LLVM c3efe9282719c35, Swift b163fed2b3101e0) Target: arm64-apple-macosx14.0
Additional information
No response