Erases all elements in the concurrent priority. This method is not concurrency-safe.
clear is not concurrency-safe. You must ensure that no other threads are invoking methods on the concurrent priority queue when you call this method. clear does not free memory.