Closed
Description
Hi @phausler
I was wondering if the task cancellation when sending an element in an AsyncChannel was not a bit too violent ?
This is the code when sending an element:
func _send(_ element: Element) async {
await withTaskCancellationHandler {
terminateAll()
} operation: { ... }
the terminateAll()
function will resume all the suspended operations (producers and consumers). What if the sending operations are performed in several Tasks? it means the async channel is finished for every one of them, which seem a bit violent right ?
Metadata
Metadata
Assignees
Labels
No labels