Tickit::Async(3pm)

✨ Tickit::Async β€” the manual, but make it slay ✨

okay bestie, this is the Tickit::Async page from the User Contributed Perl Documentation section, and it's literally about running Tickit with IO::Async. let's get into it πŸ’–


🌸 NAME 🌸

Tickit::Async β€” it's giving "use Tickit with IO::Async". that's the whole vibe. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the tea, copy it exactly bestie:

use IO::Async;
use Tickit::Async;

my $tickit = Tickit::Async->new;

# Create some widgets
# ...

$tickit->set_root_widget( $rootwidget );

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

$tickit->run;

like. iconic. set_root_widget, add it to the loop, run it, done. periodt. πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

so here's what's actually happening. this class lets a Tickit user interface run alongside other IO::Async-driven code, using IO::Async as the source of IO events. two queens sharing one event loop, as they should. 🫢

and here's the cute shortcut part: a containing IO::Async::Loop will get constructed using the default magic constructor the very first time it's needed β€” but only if the object isn't already a member of a loop. the way that works is so convenient, because it means you can use a Tickit::Async object without even being aware that it's not just a plain simple Tickit object. main character energy fr fr ✨

⚠️ but listen, bestie, this is the important bit: to avoid accidentally creating multiple loops (messy, chaotic, not the vibe), callers should be careful to add the Tickit::Async object to the main application's loop if one already exists β€” and do it as soon as possible after construction. don't wait around. add it immediately. iykyk. πŸ’€

πŸŽ€ AUTHOR πŸŽ€

Paul Evans <leonerd@leonerd.org.uk> β€” thank you king, we are obsessed πŸ«ΆπŸ‘‘


and that's the whole page, bestie!! this one shipped as perl v5.42.3 dated 2026-08-20, and it lives in the Tickit::Async(3pm) section of the manual. go forth and add your loop early. mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from