I'm using Swift 6 and tasks to concurrently process multiple PDF files for rendering, and it's working well.
But currently I'm manually limiting the number of simultaneous tasks to 2 out of fear that the system might run many tasks concurrently without having enough RAM to do the PDF processing.
Testing on a variety of devices, I've tried increasing the task limit and haven't seen any crashes, but I'm quite concerned about the possibility. Any given device might be using a lot of RAM at any moment, and any given PDF might strain resources more than the average PDF.
Is there a recommended technique for handling this kind of scenario?
Should I not worry about it and just go ahead and start a high number of tasks, trusting that the system won't run too many concurrently and therefore won't run out of RAM?
Topic:
App & System Services
SubTopic:
Processes & Concurrency