Module timer_tickets

Module timer_tickets 

Source
Expand description

A ticket issuer. Issues a ticket which should be assigned to the instance whcih was added to the timer’s queue. The ticket can be used to remove the item from queue before the timeout event. If ticket is dropped i.e connection closed, the ticket will be in timer’s queue until timeout where it will be ignored on timeout event.

Structs§

TimerDequeTicket
A ticket which is issued to the caller. If TimerDequeTicket is dropped, the Weak reference to Arc will no longer be valid and the timer would ignore the instance and remove it from the queue independeltly from the deque operation mode.
TimerDequeTicketIssuer
A type of deque which issues a tickets TimerDequeTicket which contains a TimerDequeId - a uniq number of the ticket. On timeout, the TimerDequeId is returned to indentify the timeout source.