Dmishin-pyscript is a project mainly written in PYTHON and C++, it's free.
(Just my own toy projects, I will never finish)
Queue object- contains list of the Chunks
Each chunk ocntains fixed number of tasks.
Workers:
ALgorithm of the worker:
Get the chonk from the Queue Synchronization: requires short-term access to the queue in order to claim one of the chunks. Remember original number of the free slots
Execute tasks from the chunk (does not requires any synchronization, tasks are indepedent)
Some tasks may finish. Remove finished tasks from the chunk and possibly compactify it.
Returning chunk to the queue.
Initially queue has no chunks, number of the free chunk slots is 0.
Chunk Queue Worker