Azure / DotNetty

DotNetty project – a port of netty, event-driven asynchronous network application framework
Other
4.09k stars 977 forks source link

PriorityQueue #558

Open iamkisly opened 3 years ago

iamkisly commented 3 years ago

Investigating DotNetty I found a class whose meaning I cannot understand. This is a PriorityQueue, and it implements the basic methods of a regular queue .. but unlike System.Collections.Generic.Queue, the Enqueue and Dequeue methods do not work like a FIFO, but shuffle the data entering the queue. Tell me why this is done like this?

sven-n commented 2 years ago

It's because it's an implementation of a min-max heap.