Skip to content

Do not use URLSession or Task { } for async processing #390

Description

@Samsv77

As part of Swift best practices the following items are not recommended for production use:

  • URLSession causes issues when running on Linux, please use AsyncHTTPClient instead
  • Task { } to execute background jobs are considered unstructured concurrency, and it is recommended to use withThrowingTaskGroup instead:
await withThrowingTaskGroup(of: Void.self) { group in
            group.addTask {
                ...
            }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions