Группа :: Разработка/Perl
Пакет: perl-Future-AsyncAwait
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Текущая версия: 0.66-alt1
Время сборки: 13 сентября 2023, 17:06 ( 32.6 недели назад )
Размер архива: 97.35 Kb
Домашняя страница: http://search.cpan.org/dist/Future-AsyncAwait/
Лицензия: perl
О пакете: deferred subroutine syntax for futures
Описание:
Список всех майнтейнеров, принимавших участие
в данной и/или предыдущих сборках пакета: Список rpm-пакетов, предоставляемый данным srpm-пакетом:
ACL:
Время сборки: 13 сентября 2023, 17:06 ( 32.6 недели назад )
Размер архива: 97.35 Kb
Домашняя страница: http://search.cpan.org/dist/Future-AsyncAwait/
Лицензия: perl
О пакете: deferred subroutine syntax for futures
Описание:
use Future::AsyncAwait;
async sub do_a_thing
{
my $first = await do_first_thing();
my $second = await do_second_thing();
return combine_things( $first, $second );
}
do_a_thing()->get;
This module provides syntax for deferring and resuming subroutines while
waiting for the Future manpages to complete.
WARNING: The actual semantics in this module are not yet implemented. This
is released purely to demonstrate the syntax parts of its operation, to
reserve the name on CPAN, and to provide something that actually exists in
order to look at it. Don't expect to be able to use this module in any real
code yet.
That said, the only part that isn't actually implemented currently is the part
that suspends and resumes subroutines while waiting for a future to complete.
The syntax parsing, as well as semantics for immediate futures, are already
defined and working now. So it is already very slightly useful for writing
simple functions that return immediate futures.
Instead of writing
sub foo
{
...
return Future->done( @result );
}
you can now simply write
async sub
{
...
return @result;
}
with the added side-benefit that any exceptions thrown by the elided code will
be turned into an immediate-failed `Future' rather than making the call
itself propagate the exception, which is usually what you wanted when dealing
with futures.
Текущий майнтейнер: Igor Vlasenko async sub do_a_thing
{
my $first = await do_first_thing();
my $second = await do_second_thing();
return combine_things( $first, $second );
}
do_a_thing()->get;
This module provides syntax for deferring and resuming subroutines while
waiting for the Future manpages to complete.
WARNING: The actual semantics in this module are not yet implemented. This
is released purely to demonstrate the syntax parts of its operation, to
reserve the name on CPAN, and to provide something that actually exists in
order to look at it. Don't expect to be able to use this module in any real
code yet.
That said, the only part that isn't actually implemented currently is the part
that suspends and resumes subroutines while waiting for a future to complete.
The syntax parsing, as well as semantics for immediate futures, are already
defined and working now. So it is already very slightly useful for writing
simple functions that return immediate futures.
Instead of writing
sub foo
{
...
return Future->done( @result );
}
you can now simply write
async sub
{
...
return @result;
}
with the added side-benefit that any exceptions thrown by the elided code will
be turned into an immediate-failed `Future' rather than making the call
itself propagate the exception, which is usually what you wanted when dealing
with futures.
Список всех майнтейнеров, принимавших участие
в данной и/или предыдущих сборках пакета: Список rpm-пакетов, предоставляемый данным srpm-пакетом:
- perl-Future-AsyncAwait
- perl-Future-AsyncAwait-debuginfo