crossbeam
crossbeam copied to clipboard
I'd like to suggest a select which returns a sequence of ready SelectedOperation.
It appears that select use a shuffle to ensure fairness. Instead, I'd propose a new method, select_mutlple, which returns a sequence of ready SelectedOperation. If none are ready it blocks until at least one becomes ready and returns the sequence. I've found that my server ends up using message passing and has 4 workers with 1000s of channels managed by the workers. I found that when things are active, getting one back at a time is slowing things down and isn't truly fair. I've implemented select_multiple from the latest branch as a POC. I found I received 20 or more ready for each select_multiple loop.