waitForIdle issue
Given the method waitForIdle from the BasicRobot. It iterates through all queues and waits until the queue is cleared before moving to the next. But given a scenario with queues A and B. B is working. Robot checks A. Robot checks B. Waits. B enqueues element in A. Robot checks B --> All queues cleared, though A is still working.
I have a possible solution in mind, let me know what you think.
Hi @Neitsch thanks for opening the issue. Do you have a scenario where this would pop up or is it just a good analysis of our codebase plus thinking about some ways to break it?
Because I think this is not a real issue as the intention of waitForIdle is to wait for pending events (as of now) being processed before further actions are done. When A has been checked then we assume no further checks are needed. As waiting for B might only result in further waiting - so we can't return too early.
In your scenario this might be wrong indeed. Because the events of B are not completely processed until A is done with executing the elements B enqueued. So a good solution might be better than the current implementation even if it's just a theoretical problem (at the moment).
Anyway I'm interested in your solution :)