arcgis-maps-sdk-swift-samples
arcgis-maps-sdk-swift-samples copied to clipboard
Examine excessive use of `Task` blocks in UI
https://forums.swift.org/t/task-syntax-sugar/68876 and see the related discussion on Slack.
While it is sometimes OK to wrap an async code block in a Task, it is always recommended to use structured concurrency when possible so the scope of the async task is managed.
Go through the code base and examine the unstructured Task blocks with these criteria:
- Will multiple UI state changes/UI invocations cause execution order problem or race condition?
- Will repetitively calling the block consume too much resource?
- Does the task need to be cancelled?
There aren't too many occurrences of unstructured task due to our efforts like in #153 but we shall still revisit them to ensure we are doing the right things.