This adds a MPMC queue with the ability to push to both ends of the queue, which makes it possible to prioritize cancelation.
This should already give pretty good performance when mostly used from one domain.
The push_head operation can be optimized further (I did a quick attempt and got up to 15% improvement in a high contention benchmark) and there are probably some more tweaks that could improve performance a bit, but I'm leaving that to future work.
This adds a MPMC queue with the ability to push to both ends of the queue, which makes it possible to prioritize cancelation.
This should already give pretty good performance when mostly used from one domain.
The
push_head
operation can be optimized further (I did a quick attempt and got up to 15% improvement in a high contention benchmark) and there are probably some more tweaks that could improve performance a bit, but I'm leaving that to future work.