Reactive-Extensions/Rx.rb — pull request #15 by brainopia (2014-02-21 21:11:37+00:00)
Title: Finish up PriorityQueue

Important parts:
- fix all thread-safety issues
- fix heap integrity issue (description: if an item was removed, then we always heapify the root slot, but if the item was from another position then it's a mistake. Since we replace a deleted item with the last slot then we have to heapify a deleted position to move heap to consistent state).