Last active
October 22, 2024 07:57
-
-
Save 0xMarK/276822c910d4e65a9fad8a973faf6420 to your computer and use it in GitHub Desktop.
Push work to background queues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task { | |
await withDiscardingTaskGroup { group in | |
for asset in allAssets { | |
group.addTask { | |
asset.load() | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment