Promise...:IOAsync(3)

πŸ“¦ version 0.28, in alpine 3.24

πŸ¦‹ NAME πŸ¦‹

okay so bestie, this page is Promise...:IOAsync(3), and it lives in the User Contributed Perl Documentation. The actual module is Promise::ES6::IOAsync β€” it gives you Promises/A+-compliant promises for IO::Async, and the spec URL is literally <https://github.com/promises-aplus/promises-spec> (yes, keeping the angle brackets exactly, iykyk). πŸ’–

✨ SYNOPSIS ✨

the whole vibe is:

my $loop = IO::Async::Loop->new();

my $loop_guard = Promise::ES6::IOAsync::SET_LOOP($loop);

# Now use Promise::ES6::IOAsync as you would plain Promise::ES6.

πŸ’€ DEPRECATION NOTICE πŸ’€

okay, real talk: this module is deprecated and will go away eventually. Use use_event() instead, as described in Promise::ES6’s documentation. so don’t build your entire main character arc on it, mkay? πŸ’€βœ¨

🌸 DESCRIPTION 🌸

This module exposes the same functionality as Promise::ES6::AnyEvent, but for IO::Async rather than AnyEvent.

Here’s the tea: AnyEvent assumes that an event loop is global, while IO::Async allows multiple concurrent event loops. In order to accommodate this difference in architecture, this module requires an active IO::Async::Loop object before it can be used. See SET_LOOP() below. πŸŒ€πŸ’…

πŸ”₯ FUNCTIONS πŸ”₯

πŸŽ€ $guard = SET_LOOP( $LOOP ) πŸŽ€

This sets this module’s active IO::Async::Loop object. It’s an internal global; if you try to set a loop while one is already set, an exception is thrown. no cap. 😭

This returns an opaque object that, when DESTROY()ed, will clear this module’s internal loop. so the guard is literally the vibe check for the loop. 🫢✨


xoxo, your Unix bestie πŸ’– β€” this page is from the User Contributed Perl Documentation on perl v5.42.2, dated 2026-02-15. periodt. πŸ’…πŸŒΈ

πŸ“¦ where this page comes from