Future...IOAsync(3pm)

✨ NAME ✨

Future::IO::Impl::IOAsync β€” it's the glow-up that makes Future::IO run on top of IO::Async, bestie πŸ’–

(also filed under "User Contributed Perl Documentation", which is where you found this, so hi 🫢)


🌸 DESCRIPTION 🌸

Okay so here's the tea πŸ“: this module is an implementation for Future::IO that does all its heavy lifting with IO::Async. That's the whole plot. No cap.

And the best part? There are no extra methods for you to learn, bestie. Literally none. You just load it, it clocks in, and it quietly hands Future::IO all the implementation methods it needs. Main character energy, zero demands. πŸ‘‘

use Future::IO;
use Future::IO::Impl::IOAsync;

my $f = Future::IO->sleep(5);
...

That's it. That's the vibe. Load it, and suddenly your Future::IO calls are being served by IO::Async. Slay. ✨


πŸ’€ LIMITATIONS πŸ’€

Okay so not everything is perfect and we need to be fr fr about it. πŸ™ˆ

This module only provides a limited subset of the poll in Future::IO method API. Here's the breakdown:

  • POLLIN and POLLOUT conditions β€” fully handled, we got you πŸ’…
  • POLLHUP and POLLERR events β€” not able to report on these, bestie, it's just not in the cards 😭
So when a filehandle is at hangup condition, it gets reported as only POLLIN. And when it's at error condition, it gets reported as only POLLOUT.

Now, is that a problem? Honestly, for most purposes it's totally sufficient β€” it works fine for internally providing asynchronous reading and writing on regular filehandles. 🫢

But if you're out here trying to detect those conditions directly yourself? Yeah, you might get some odd behaviours. Consider yourself warned, iykyk. 🌈


πŸŽ€ AUTHOR πŸŽ€

Paul Evans <leonerd@leonerd.org.uk> β€” thank you for your service, king πŸ‘‘


And that's a wrap on this little page from perl v5.40.1, dated 2026-02-21. Stay asynchronous, stay hydrated, and remember: load the module and let it cook. πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from