title: Removing an arbitrary item from the priority queue
body: <p>How can I remove an arbitrary item from a priority queue. Suppose I have a PriorityQueue for jobs. I have a job I want to "cancel" so I need to remove it from the queue, how can I do that?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>To add to the answer, a related question: <a href="https://stackoverflow.com/a/9288081/292291">https://stackoverflow.com/a/9288081/292291</a></p>