Skip Menu |

This queue is for tickets about the Future-AsyncAwait CPAN distribution.

Report information
The Basics
Id: 133844
Status: open
Priority: 0/
Queue: Future-AsyncAwait

People
Owner: Nobody in particular
Requestors: leonerd-cpan [...] leonerd.org.uk
Cc: DBOOK [...] cpan.org
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Consider `await_all` to neaten up Future->needs_all
Now that F-AA 0.47 supports `await` at toplevel, it's rare to really see the underlying Future-related machinery most of the time, when dealing with async/await syntax. One place it still becomes apparent, is when waiting on multiple concurrent things; such as the commonplace my ( $one, $two, $three ) = await Future->needs_all( ONE(), TWO(), THREE() ); Perhaps this too could be neatened up by the addition of a new helper `await_all` keyword which does the same thing: my ( $one, $two, $three ) = await_all ONE(), TWO(), THREE(); -- Paul Evans
On Mon Nov 30 17:58:00 2020, PEVANS wrote: Show quoted text
> Now that F-AA 0.47 supports `await` at toplevel, it's rare to really > see the underlying Future-related machinery most of the time, when > dealing with async/await syntax. One place it still becomes apparent, > is when waiting on multiple concurrent things; such as the commonplace > > my ( $one, $two, $three ) = await Future->needs_all( > ONE(), TWO(), THREE() > ); > > Perhaps this too could be neatened up by the addition of a new helper > `await_all` keyword which does the same thing: > > my ( $one, $two, $three ) = await_all ONE(), TWO(), THREE();
It seems slightly confusing since needs_all may not always be the convergent future you want to apply and this syntax doesn't really make the specific semantics apparent. (But it could pick one and document that) -Dan