Re: Somewhere in this constructor of PriorityBlockingQueue is hard to understand

Liu via Concurrency-interest <[email protected]> Wed, 5 Aug 2020 13:42:16 +0800 (CST)
Newsgroups gmane.comp.java.jsr.166-concurrency
Message-ID <[email protected]>
i see, in this point, heapify() can find any null item.


But about first question, as I says,
only when "pq.getClass() == PriorityBlockingQueue.class" Expression holds, then you can do "screen = false".
Is this opinion wrong?

Maybe Instanceof allows subclasses which could be coded to allow null items.

_______________________________________________
Concurrency-interest mailing list
[email protected]
http://cs.oswego.edu/mailman/listinfo/concurrency-interest