Closed nadenf closed 11 months ago
closed on purpose?
@SethTisue .. Yes. I didn't realise there actually was an Async.race. And select is what is used in Rust.
Yes, both select and race are present. Select works as expected if you came from Go, Rust or Kotlin; while race provides you a way to combine sources into a racing source (that could itself be raced). They're sitting at different levels of abstraction and friendliness of use imo.
The term select in programming is used when a user explicitly picks something from a list. For example, select a column from a table.
In the
Async.select
example it is not the user choosing a Future it is the gears library. And it's hidden from the user what the criteria is that determines which Future is being selected.The better term is in fact
Async.race
which is clear and obvious.