AnyEvent-XSPromises
view release on metacpan or search on metacpan
lib/AnyEvent/XSPromises.pm view on Meta::CPAN
=back
=head1 COMPARISON TO OTHER PROMISES LIBRARIES
=over
=item Promises
L<Promises> is a pure-Perl Promises implementation that allows selecting one of multiple event loop backends. However,
this backend is defined globally and the documentation suggests that it would be best if only the application developer
picks a backend. This means that libraries cannot know up front which event loop backend they have to use, and they need
to support all event loops or the library would break if a different event loop is chosen. This has lead library authors
to mandate that the selected backend is AnyEvent, defying the purpose of backend selection other than for usage in
scripts that do not need compatibility with other code such as libraries from CPAN.
The library also trades performance and resilience for a few features that are not needed to implement the Promises/A+
specification.
Promises from this library are compatible with ours if the backend is set to C<AE> or C<AnyEvent>.
#ifndef UV_MAX
# define UV_MAX PERL_ULONG_MAX
#endif
#endif
#ifndef IVSIZE
# ifdef LONGSIZE
# define IVSIZE LONGSIZE
# else
# define IVSIZE 4 /* A bold guess, but the best we can make. */
# endif
#endif
#ifndef UVTYPE
# define UVTYPE unsigned IVTYPE
#endif
#ifndef UVSIZE
# define UVSIZE IVSIZE
#endif
#ifndef sv_setuv
#endif
#ifndef PERL_MAGIC_backref
# define PERL_MAGIC_backref '<'
#endif
#ifndef PERL_MAGIC_ext
# define PERL_MAGIC_ext '~'
#endif
/* That's the best we can do... */
#ifndef sv_catpvn_nomg
# define sv_catpvn_nomg sv_catpvn
#endif
#ifndef sv_catsv_nomg
# define sv_catsv_nomg sv_catsv
#endif
#ifndef sv_setsv_nomg
# define sv_setsv_nomg sv_setsv
( run in 1.037 second using v1.01-cache-2.11-cpan-4e96b696675 )