Swift concurrency: Behind the scenes

RSS for tag

Discuss the WWDC21 session Swift concurrency: Behind the scenes.

View Session

Posts under wwdc21-10254 tag

2 Posts
Sort by:
Post not yet marked as solved
0 Replies
243 Views
Hi all, I have a large file to upload server. This process requires 3 steps. The first is to inform the server about the file ( #of chunks size, name etc.., Type: DataTask) The second step starts according to the server response (contains next step data). (Type: FirstOperation) In the second step, each file chunk is transmitted to the server. In the last step, Client send a request to informed that the transfer has been completed (Type: ChunkOperation) in the third steps, service dosent work. I can see in the log file that last operation method called, but no response available. (LastOperation) There is no problem while the application is in the foreground.. FirstOperation.txt ChunkOperation.txt LastOperation.txt uploadManager.txt
Posted
by solmaz.
Last updated
.
Post not yet marked as solved
0 Replies
450 Views
I've had an issue in my project where I trigger a task from a SwiftUI View with the modifier .task. From there it calls and async function into an actor that has a TaskGroup that makes concurrent network calls that has a type of Void.self. I've noticed that sometimes the TaskGroup is either never called and will no longer be called. I'm wondering if perhaps a TaskGroup inside of an Actor that has a parent Task created outside the Actor is a problem? But it does seem to work if I change the Actor to a Class. Could someone help explain to me why this is?
Posted
by derikf.
Last updated
.