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 toaddtheTickit::Asyncobject 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
- ubuntu stonking: libtickit-async-perl 0.25-1build6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms