Mojo::...lQueue(3pm)

hey bestie 🌸 welcome to the Mojo::RabbitMQ::Client::LocalQueue page β€” it's a 3pm manual from User Contributed Perl Documentation, also known in the header as Mojo::...lQueue(3pm). it's giving callback queue realness, and we're keeping every detail, fr fr πŸ’–

🌸 NAME 🌸

Mojo::RabbitMQ::Client::LocalQueue β€” callback queue. that's the name, that's the vibe, periodt πŸ’…

✨ SYNOPSIS ✨

  use Mojo::RabbitMQ::Client::LocalQueue

  my $queue = Mojo::RabbitMQ::Client::LocalQueue->new();

  # Register callback when content appears
  $queue->get(sub { say "got expected content: " . $_[0] });

  # Push some content to consume
  $queue->push("It Works!");

  # This prints:
  # got expected content: It Works!

okay so here's the little demo, bestie: you use it, make a $queue with ->new(), register a callback with ->get(...), push "It Works!" with ->push(...), and the callback prints got expected content: It Works! β€” iconic behavior πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

Mojo::RabbitMQ::Client::LocalQueue is a queue for callbacks expecting some content to be received. literally that's the whole description β€” it's a queue for callbacks that are waiting on content to arrive, no cap πŸ’–

🫢 METHODS 🫢

Mojo::RabbitMQ::Client::LocalQueue implements following methods:

πŸŽ€ get πŸŽ€

  $queue->get(sub { process_message($_[0]) })

Registers a callback which is executed when new message is pushed to queue. so you hand it a sub, and when a new message gets pushed onto the queue, that sub runs β€” callback main character energy ✨

πŸ“ push πŸ“

  $queue->push("Some content");
  $queue->push({objects => 'are also welcome});

Pushes content to queue and also drains all declared callbacks. so it pushes the content in and drains all declared callbacks too, fr fr πŸ”₯

🌈 SEE ALSO 🌈

go check out Mojo::RabbitMQ::Client and Mojo::RabbitMQ::Client::Channel β€” they're right there in the SEE ALSO lineup, bestie πŸ’œ

Copyright (C) 2015-2017, Sebastian Podjasek and others

Based on AnyEvent::RabbitMQ::LocalQueue - Copyright (C) 2010 Masahito Ikuta, maintained by "bobtfish@bobtfish.net"

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

okay that's the whole page, bestie πŸ’– β€” this one's from perl v5.42.0, dated 2019-08-25, and it's the Mojo::...lQueue(3pm) page. bye, slay, and hydrate πŸŽ€

πŸ“¦ where this page comes from