• Post Reply Bookmark Topic Watch Topic
  • New Topic

Blocking queues

 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"It is much easier and safer to use higher level structures that have been implemented by concurrency experts"

Source: Core Java Vol. 1 (8th Ed) P.764.

Would you agree with the above statement? Why?
 
Henry Wong
author
Sheriff
Posts: 22541
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Basically, the book is saying -- have your threads use a thread-safe collection to pass data around. This is easier than passing the data around in a non-thread-safe collection where you have to deal with thread safety yourself.

In other words, your options are "don't deal with thread safety" or "deal with thread safety". Isn't doing nothing easier than doing something?

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!