tag:blogger.com,1999:blog-8712770457197348465.post788536088403785961..comments2024-03-17T23:01:26.872-07:00Comments on Javarevisited: How to use BlockingQueue in Java? ArrayBlockingQueue and LinkedBlockingQueue Example Tutorialjavin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-8712770457197348465.post-75947659841415514172013-07-17T23:21:28.851-07:002013-07-17T23:21:28.851-07:00Queue's can be major source of latency in mult...Queue's can be major source of latency in multi-threading environment. Extensive use of Queue in low latency application can jeopardize your performance goal, as there is always contention. Minimize sharing data between threads, that should be end goal.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-8670892509502452852013-05-08T20:04:24.047-07:002013-05-08T20:04:24.047-07:00I think most important difference between ArrayBlo...I think most important difference between ArrayBlockingQueue and LinkedBlockingQueue is that former is bounded and later is unbounded. So use former, if you need bounded queue functionality otherwise simply use LinkedBlockingQueue.Millernoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-52481154537780298762013-04-16T00:31:56.513-07:002013-04-16T00:31:56.513-07:00How do you know if BlockingQueue is thread-safe an...How do you know if BlockingQueue is thread-safe and doesn't allow null elements? Did you ran any test?? Also it's worth mentioning that take() remove objects from head of the queueAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-8721177259705882482012-12-28T19:25:25.344-08:002012-12-28T19:25:25.344-08:00@Anonymous, That's Indeed typo. put() method b...@Anonymous, That's Indeed typo. put() method blocks if BlockingQueue is full. Thanks for pointing it out.Javin @ transient vs volatile javahttp://javarevisited.blogspot.sg/2012/03/difference-between-transient-and.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-35653431686218003832012-12-28T07:18:27.053-08:002012-12-28T07:18:27.053-08:00I think there is a typo in the following statement...I think there is a typo in the following statement:<br /><br />"take() method of BlockingQueue will block if Queue is empty and put() method of BlockingQueue will block if Queue is empty."<br /><br />should be "put() method of BlockingQueue will block if Queue is full."<br /><br /><br />Anonymousnoreply@blogger.com