Module timer_consumer

Module timer_consumer 

Source
Expand description

A consumer type of the timer which consumes the intance and returns it when timer triggers. The consumed instance normally whould be Send because it will be moved into the timer which may be processed in other thread.

Structsยง

TimerDequeConsumer
This type of the queue consumes the instance for which the timer is set. The item must be Send and Clone, std::sync::Arc. This is convinient when it is required to store the instance in the timer and retrive it when the timeout happens. This method allows to avoid for lookups in the lists and working directly with the stored items.