If the deepest queues (higher index in queues list) are now empty (after being popped from) then remove them
(&mut self, leave_last: bool)
| 104 | |
| 105 | // If the deepest queues (higher index in queues list) are now empty (after being popped from) then remove them |
| 106 | fn cleanup_queues(&mut self, leave_last: bool) { |
| 107 | while self.message_queues.last().filter(|queue| queue.is_empty()).is_some() { |
| 108 | if leave_last && self.message_queues.len() == 1 { |
| 109 | break; |
| 110 | } |
| 111 | self.message_queues.pop(); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | /// Add a message to a queue so that it can be executed. |
| 116 | /// If `process_after_all_current` is set, all currently queued messages (including children) will be processed first. |
no test coverage detected