Tirex::Queue(3pm)
π NAME π
Tirex::Queue β the job queue for the Tirex system, bestie. It's giving "line up, we'll get to you when we get to you" β¨
π SYNOPSIS π
use Tirex::Queue;
my $q = Tirex::Queue->new();
$q->add( Tirex::Job->new(...) );
my $job = $q->next();
like. that's the whole vibe. four lines and you're queuing πΈ
π¦ DESCRIPTION π¦
okay so Tirex::Queue implements a prioritized queue of Tirex::Job items. not just any queue β a prioritized one. the jobs have main character energy and the important ones go first π
π
π METHODS π
π Tirex::Queue->new()
Makes you a shiny new Tirex queue object. Normally this can not fail. so like, no anxiety, it's gonna work, we love low-stakes constructor behavior π«Ά
π§ $queue->reset()
Resets the queue. All jobs on the queue will be lost! π like, gone gone. no takebacks.
Returns the queue itself, so you can chain calls. obsessed with a method that hands you back yourself, honestly iconic β¨
πΈ $queue->size()
Returns the size of the queue. π
Heads up though: there can be jobs on the queue that are already expired, and they will still be counted in this size value. so the number is the number, expired girlies included π
π $queue->empty()
Is the queue empty? the eternal question.
Returns true if the queue is empty, false otherwise. boolean realness π¦
β $queue->status()
Return status of the queue. that's it. that's the post π«
π₯ $queue->add($job1, $job2, ...)
Adds one or more jobs to the queue. You can also call it with an array reference and all jobs inside the array will be added to the queue. versatile queen π
Returns the queue itself, so that calls can be chained. periodt.
π $queue->in_queue($job)
Is this metatile already in the queue? asking the important questions πββοΈ
Returns the job that is in the queue, or undef if it's not in there. no job, no answer, just undef β the void, the silence π
π $queue->next()
Removes the topmost job from the queue and returns it. bye bestie, you're up π
Returns undef if the queue is empty. nothing to serve, nobody home π
π¦ $queue->peek()
Peek at the topmost job from the queue and return it. π
Does not remove the job from queue. it's a look, not a grab. respectful. we love a no-strings peek β¨
Returns undef if the queue is empty.
π« $pq->reset_maxsize()
Reset maxsize. New maxsize will be equal to current size. π
Returns new maxsize;
π§ $pq->remove_jobs_for_unknown_maps()
Remove all jobs from this prioqueue where the map is undefined. ποΈ
This can happen after a reload of the config file, when a map was deleted from it. so like, ghost jobs for maps that no longer exist β sweep them out, cleanse the timeline πΈ
π SEE ALSO π
Tirex::PrioQueueTirex::Job
and that's the whole page, bestie!! this was documented for perl v5.40.1, dated 2026-08-09 β shoutout to the User Contributed Perl Documentation crew for hosting the whole thing π«Άβ¨ go queue something, you got this π
π¦ where this page comes from
- ubuntu stonking: tirex 0.8.0+ds-2build3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms