- 
                Notifications
    
You must be signed in to change notification settings  - Fork 109
 
Open
Description
When to use this library in swift 6 mode:
    try await withThrowingTaskGroup(of: Bool.self) { group in
            let session = try SSH(host: "xxx", port: xxx)
            // xxx
            let sftp = try session.openSftp()
            for file in files {
                group.addTask { <--- This line comes the error
                    return try await self.upload(file: file, with: sftp, session: session)
                }
            }
}
The error on the addTask:
Value of non-Sendable type '@isolated(any) @async @callee_guaranteed @substituted <τ_0_0> () -> (@out τ_0_0, @error any Error) for <Bool>' accessed after being transferred; later accesses could race; this is an error in the Swift 6 language mode
Please considering to make the related file to sendable could be solve the issue. thanks!
Metadata
Metadata
Assignees
Labels
No labels
