swift-evolution icon indicating copy to clipboard operation
swift-evolution copied to clipboard

Add try await keywords when chopping veggies

Open ryansobol opened this issue 4 years ago • 0 comments

Is this code example missing the try await keywords when chopping veggies? In the previous example, inside the loop that would not produce any meaningful concurrency, line 190 is written:

veggies[i] = try await veggies[i].chopped()

It seems like the chopped() method has the potential for an async kitchen knife incident for each veggie. I assume this potential also needs to be accounted for in the meaningful concurrency example too?

ryansobol avatar Dec 31 '20 16:12 ryansobol