You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
When to use this library in swift 6 mode:
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!
The text was updated successfully, but these errors were encountered: