Skip to content

Commit 582144d

Browse files
Update Main.java
1 parent 2877015 commit 582144d

File tree

1 file changed

+1
-1
lines changed
  • priorityqueue/PriorityQueueViaPriorityBlockingQueue/src/main/java/ds/priorityqueueviapriorityblockingqueue

1 file changed

+1
-1
lines changed

priorityqueue/PriorityQueueViaPriorityBlockingQueue/src/main/java/ds/priorityqueueviapriorityblockingqueue/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class Main {
1212
private static final Logger logger = Logger.getLogger(Main.class.getName());
1313

1414
// switch to PriorityQueue to see how polling is trying to poll
15-
// the same item in different threads because PriorityQueue is not blocking
15+
// the same item in different threads because PriorityQueue is not thread-safe
1616
private static BlockingQueue<Integer> queue = new PriorityBlockingQueue<>();
1717

1818
public static void main(String[] args) {

0 commit comments

Comments
 (0)