DELAY_QUEUE_SPLIT
This is an example I wrote when answering a question in /r/rust
and got carried away.
It implements an extension trait for tokio's
DelayQueue
that adds a split()
method to split the DelayQueue into Insert
and Read
parts,
that can be used in separate tasks (or threads).
See this example to see how it's used.