but for now, I don't think I will implement this. Although it saves some typing, the added complexity to the implementation doesn't seem t justify it, since it doesn't actually allow you to do something that you can't already do.
If this were Mojolicious, then the first form could be a blocking command, ie. equivalent to this:
my $cv = $client->cwd('/foo');
$cv->recv;
sub { ... }->(); # though you probably wouldn't write it this way.
but calling recv before a message is available is discouraged in AE land since it isn't supported by all of the evet loops.
I keep thinking it would be good to be able to do
as an alternative to
but for now, I don't think I will implement this. Although it saves some typing, the added complexity to the implementation doesn't seem t justify it, since it doesn't actually allow you to do something that you can't already do.
If this were Mojolicious, then the first form could be a blocking command, ie. equivalent to this:
but calling recv before a message is available is discouraged in AE land since it isn't supported by all of the evet loops.