How do I simulate the asynchronous process?



  • Hello, there's a pattern.

    введите сюда описание изображения

    Where the first element is the turn of six elements and the second of the processor, the point is that with some early delay (1-2 seconds), we start the element in line and if one of the processors is empty, then we release the element from the turn to the processor, where it is delayed by 5 seconds and comes out, but the elements are still being processed in the processors, the turn shall be filled up and down. I want to do this through the library asyncio, but I can't figure out how to do it, because first, we need to set up a whole list of dishes, and then it's asynchronous to start, but in this case, it's not available in advance. I would be very grateful for the help of implementation.



  • I think it's better to use ops and tracks, processors and a common system in different classes, then through the methods to run the elements and catch the time of the last event.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2