lampepfl / gears

A strawman for a low-level async library in Scala 3.
https://lampepfl.github.io/gears/
Apache License 2.0
257 stars 26 forks source link

Seq[Future[T]].altAll is unintuitive #29

Closed nadenf closed 9 months ago

nadenf commented 11 months ago

There is no description for what the term altAll means in the following code:

Seq[Future[T]].altAll

It doesn't make clear the fact that it is awaiting on something nor does it make sense given it's not waiting on all of the futures. Based on the description isn't something along these lines better:

Seq[Future[T]].awaitFirst Seq[Future[T]].awaitFirstSuccess

Or even this if alt all means something:

Seq[Future[T]].awaitAltAll

natsukagami commented 9 months ago

Changed to .awaitFirst by #44 :)