Swift concurrency: Behind the scenes

RSS for tag

Discuss the WWDC21 session Swift concurrency: Behind the scenes.

Posts under wwdc21-10254 tag

2 Posts

Post

Replies

Boosts

Views

Activity

Uploading Files in the Background
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
1
0
639
Nov ’21
TaskGroup in and Actor
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?
0
0
685
Aug ’21
Uploading Files in the Background
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
Replies
1
Boosts
0
Views
639
Activity
Nov ’21
TaskGroup in and Actor
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?
Replies
0
Boosts
0
Views
685
Activity
Aug ’21