shared: add simple priority queue implementation