I have a concurrency of 10 and the tasks check queue.size
to see whether the queue has fallen underneath a certain number. As soon as a task sees that, it should asynchronously add 20 more tasks to the queue. But how can I do this without the other 9 tasks also trying to add those 20 new tasks to the queue as well?
I'm looking for a way to keep the size of the queue above a certain minimum number (20 in this case) by adding new items to the queue asynchronously (such as calling an API or database to determine what those next 20 queue items should be).
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too