How to create a multi-threaded, non-blocking machine?
I'm trying to create a machine that's multi-threaded and can process many (say hundreds or thousands) of entities for their fixed duration without blocking and running single-threaded. If up to 500 entities can be in the machine at any given time, but each one must stay in the machine for say 2 hours. Creating a single queue to feed 100's/1,000's of instances of the same single-threaded machine instance seems like a bad way to approach it.
Example: I'm thinking something along the lines of a continuous oven used for baking bread, etc. or anything that is a conveyor system loop. See this video to reference what I'm suggesting: https://www.youtube.com/watch?v=3UjUWfwWAC4&t=120
If the output speed is 500/hr but it takes 1 hour to traverse the continuous oven, then I don't think it's accurate to say any one item takes 1/500th of the time and use a regular machine with 500/hr. That might accurately model the output rate of the machine, but not the capacity (i.e. number of parts simultaneously held within) of the machine nor does it reflect the total time it takes an entity (loaf of bread) to pass through the system. Every entity takes the entire duration required to traverse the loop, but the machine (oven) can handle multiple items at the same time.