ARTICLE AD BOX
I have this code:
func drawCount() { Task { await _drawCount() } } func _drawCount() async { let k = await Task.detached(priority: .low) { return gfed.filter{$0.blah}.count // the filter takes ~100-500ms }.value thing.text = "\(k) units" }There are 10 or 20 of the things on the screen. All at once, drawCount is called for each of them.
My belief is that all 10 are called, the UI is not blocked, and the 10 filters will complete at various times (say in the next second or so). As each one completes, that label or whatever will be updated on the UI, and away we go.
Correct or not?
