Java, in the implementation of the PriorityQueue object, uses Heap.
Does the Implementation (by Java) parallel the “heapify” operation after the poll() operation (by another thread, for example)?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The heapify operation only considers one element at a time, sinking or sifting it up. I don’t know of a way in which it can be parallelized.
Still if you want to make sure why don’t you have a look at the code?
EDIT: I am now sure at least for openjdk’s implementation