class MessageQueue

Defined in:

privateparlor/queue/message_queue.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add_to_queue(cached_msid : Int64 | Array(Int64), sender_id : Int64 | Nil, receiver_ids : Array(Int64), reply_msid : Nil, func : MessageProc) : Nil #

Creates a new QueuedMessage and pushes it to the back of the queue.


[View source]
def add_to_queue(cached_msid : Int64 | Array(Int64), sender_id : Int64 | Nil, receiver_ids : Array(Int64), reply_msids : Hash(Int64, Int64), func : MessageProc) : Nil #

Creates a new QueuedMessage with a reply and pushes it to the back of the queue.


[View source]
def add_to_queue_priority(receiver_id : Int64, reply_msid : Int64 | Nil, func : MessageProc) : Nil #

Creates a new QueuedMessage and pushes it to the front of the queue.


[View source]
def get_message : QueuedMessage | Nil #

[View source]
def queue : Deque(QueuedMessage) #

[View source]
def queue_mutex : Mutex #

[View source]
def reject_messsages(&) : Nil #

[View source]