The else branch breaks the loop if a consumer is encountered that is not available, but should just continue in that case to the next consumer. It should break if the pending data queue is empty. This is solved by extracting data from the queue with an if let statement, so the compiler takes care of exiting early for performance.
This does not fix the bug where the benchmark doesn't produce results when run in parallel. That's a runtime bug.
The else branch breaks the loop if a consumer is encountered that is not available, but should just continue in that case to the next consumer. It should break if the pending data queue is empty. This is solved by extracting data from the queue with an if let statement, so the compiler takes care of exiting early for performance. This does not fix the bug where the benchmark doesn't produce results when run in parallel. That's a runtime bug.