Reddit Reddit reviews Java Concurrency in Practice

We found 50 Reddit comments about Java Concurrency in Practice. Here are the top ones, ranked by their Reddit score.

Computers & Technology
Books
Computer Software
Java Concurrency in Practice
Addison-Wesley Professional
Check price on Amazon

50 Reddit comments about Java Concurrency in Practice:

u/Cohesionless · 17 pointsr/cscareerquestions

The resource seems very extensive such that it should suffice you plenty to be a good software engineer. I hope you don't get exhausted from it. I understand that some people can "hack" the technical interview process by memorizing a plethora of computer science and software engineering knowledge, but I hope you pay great attention to the important theoretical topics.

If you want a list of books to read over the summer to build a strong computer science and software engineering foundation, then I recommend to read the following:

  • Introduction to Algorithms, 3rd Edition: https://www.amazon.com/Introduction-Algorithms-3rd-MIT-Press/dp/0262033844. A lot of people do not like this classic book because it is very theoretical, very mathematical, and very abstract, but I think that is its greatest strength. I find a lot of algorithms books either focus too much about how to implement an algorithm in a certain language or it underplays the theoretical foundation of the algorithm such that their readers can only recite the algorithms to their interviewers. This book forced me to think algorithmically to be able to design my own algorithms from all the techniques and concepts learned to solve very diverse problems.

  • Design Patterns: Elements of Reusable Object-Oriented Software, 1st Edition: https://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612/. This is the original book on object-oriented design patterns. There are other more accessible books to read for this topic, but this is a classic. I don't mind if you replace this book with another.

  • Clean Code: A Handbook of Agile Software Craftsmanship, 1st Edition: https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882. This book is the classic book that teaches software engineer how to write clean code. A lot of best practices in software engineering is derived from this book.

  • Java Concurrency in Practice, 1st Edition: https://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601. As a software engineer, you need to understand concurrent programming. These days there are various great concurrency abstractions, but I believe everyone should know how to use low-level threads and locks.

  • The Architecture of Open Source Applications: http://aosabook.org/en/index.html. This website features 4 volumes of books available to purchase or to read online for free. It's content focuses on over 75 case studies of widely used open-source projects often written by the creators of said project about the design decisions and the like that went into creating their popular projects. It is inspired by this statement: "Architects look at thousands of buildings during their training, and study critiques of those buildings written by masters."

  • Patterns of Enterprise Application Architecture, 1st Edition: https://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420/. This is a good read to start learning how to architect large applications.

    The general theme of this list of books is to teach a hierarchy of abstract solutions, techniques, patterns, heuristics, and advice which can be applied to all fields in software engineering to solve a wide variety of problems. I believe a great software engineer should never be blocked by the availability of tools. Tools come and go, so I hope software engineers have strong problem solving skills, trained in computer science theory, to be the person who can create the next big tools to solve their problems. Nonetheless, a software engineer should not reinvent the wheel by recreating solutions to well-solved problems, but I think a great software engineer can be the person to invent the wheel when problems are not well-solved by the industry.

    P.S. It's also a lot of fun being able to create the tools everyone uses; I had a lot of fun by implementing Promises and Futures for a programming language or writing my own implementation of Cassandra, a distributed database.
u/toodledoo · 12 pointsr/programming

Java Concurrency in Practice by Brian Goetz is a very good book to get started on the concurrency package. I would recommend reading through it atleast once.

u/Quince · 11 pointsr/programming

The problem is, most books are ground out by publishing mills and have very little value - especially to more experienced developers.

I try to choose books carefully and buy very few because most simple answers are already online.

One recent purchase which I felt was actually worth the money (i.e., the same depth of discussion and information was unavailable free in such as well-presented format) was:

"Java Concurrency in Practice" by Brian Goetz
http://amazon.com/o/asin/0321349601

This is an example of how high the bar needs to be raised to make a book worthwhile.

u/pjmlp · 8 pointsr/java

You missed:

Filthy Rich Clients

http://www.amazon.com/Filthy-Rich-Clients-Developing-Applications/dp/0132413930

Not so relevant now that JavaFx is here, but still a good way to understand how to properly write Swing code that doesn't put Java to shame.

Java Concurrency in Practice

http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601

A must read for anyone writing multicore code on the JVM.

u/dafrito · 6 pointsr/learnprogramming

"Java Concurrency In Practice" is the text that I would recommend.

http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601

u/fact_hunt · 6 pointsr/java

For concurrency you can't go wrong with Java Concurrency in Practice

u/caryy · 5 pointsr/learnprogramming

In addition to Code Complete 2, which, while very dense, is a compendium of wonderful coding knowledge... I recommend Clean Code by Robert C. Martin.

One of the best books on concurrency that I've ever read is definitely Java Concurrency In Practice it's (obviously) written with Java in mind, but most of the concepts map rather easily to constructs in other languages as well.

The standard for design patterns is still probably Design Patterns (colloquially "Gang of Four")... but I've heard good things about Head First Design Patterns as well, despite the really stupid cover.

u/Ownaginatious · 5 pointsr/java

These two are good reference guides despite their age. Lots of good best practice stuff.

u/GlitteringSkeleton · 4 pointsr/javahelp

I'd start with this article. Finding newer versions of the books mentioned here is going to get you going on the right path. Here's a few I've picked out that I've personally read over the years.

Java: A Beginners Guide - Doesn't really get much better than this as far as an introduction into Java. Clean examples, pretty easy to follow. Would be a great place to start

Effective Java - This has historically been an excellent reference for Java. It's not entirely beginner friendly, but if you have at least a working knowledge of Java it's an excellent book to have around. Note: The link is for the 3rd edition which is coming out soon, I assume it will be as good as the previous editions, but in any case the information from the previous editions is still worthwhile even if there are newer features in Java 7/8/9 which is covered by the 3rd edition

Java Concurrency in Practice - As you become more advanced this book can help guide you along the ways of concurrent operations in Java and pitfalls/issues you'll run into (and how to avoid them)

u/kraftvgs · 3 pointsr/javahelp

We use it at work for asynchronous service calls. We deal with heavy amounts of data sometimes requiring hundreds of separate service queries. If we do them sequentially it takes a solid minute, but if we do them asynchronously we can really shave that time down. As others have said, though, it adds a LOT of complexity. It is also difficult to write unit tests for. If you are genuinely curious I would recommend Java Concurrency in Practice to learn more about it.

u/KiteWatcher · 3 pointsr/programming

I'm not too sure about a general purpose book, but if you are interested in learning about Java's concurrency stuff I'd recommend Java Concurrency In Practice. I'm sure you'll see threading in the corporate world and this book was actually recommended to me by a Google employee who was a guest professor for a semester.

u/_dban_ · 3 pointsr/java

Java Concurrency In Practice is the book you want to read.

u/sh0rug0ru · 3 pointsr/java

If you want a deeper understanding of concurrency, the go-to book is Concurrency in Practice.

For Spring, the go-to book is Spring in Action.

The best book I've read for OOP is Agile Patterns, Practices and Principles for C#. The first 1/3 of the book is Agile stuff, but the rest is a wide variety of topics in OOP. There used to be a Java version of this book, but the newer version is C#. But the C# code is nothing to different than what you would do in Java.

u/thehollyhopdrive · 3 pointsr/java

Two Java specific books you should read cover to cover (and keep around as an effective reference) are Effective Java and Java Concurrency in Practice, and you should also seriously consider reading Design Patterns. The examples in it aren't written in Java but they hold for all OO languages.

u/GeorgeMaheiress · 3 pointsr/java

A good resource is Java Concurrency In Practice. Sounds like you'd be interested in Item 5.3: Blocking Queues and the Producer-consumer Pattern. Unfortunately I can't share it with you as it's copyrighted, but here's the short code snippet from it:

Producer & Consumer:


public class FileCrawler implements Runnable {
private final BlockingQueue<File> fileQueue;
private final FileFilter fileFilter;
private final File root;
...
public void run() {
try {
crawl(root);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}

private void crawl(File root) throws InterruptedException {
File[] entries = root.listFiles(fileFilter);
if (entries != null) {
for (File entry : entries)
if (entry.isDirectory())
crawl(entry);
else if (!alreadyIndexed(entry))
fileQueue.put(entry);
}
}
}

public class Indexer implements Runnable {
private final BlockingQueue<File> queue;

public Indexer(BlockingQueue<File> queue) {
this.queue = queue;
}

public void run() {
try {
while (true)
indexFile(queue.take());
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}

And startup method:


public static void startIndexing(File[] roots) {
BlockingQueue<File> queue = new LinkedBlockingQueue<File>(BOUND);
FileFilter filter = new FileFilter() {
public boolean accept(File file) { return true; }
};

for (File root : roots)
new Thread(new FileCrawler(queue, filter, root)).start();

for (int i = 0; i < N_CONSUMERS; i++)
new Thread(new Indexer(queue)).start();
}

u/SofaAssassin · 3 pointsr/cscareerquestions

You probably won't need to do anything until you actually start working, because you don't know what the tech stack of your company looks like yet.

For me, the generic Java-centric books that I think every Java developer should read are the following. They are the only Java books I did not end up burning/shredding:

  • Java Concurrency in Practice - Written by Brian Goetz, who architected and implemented large portions of the java.util.concurrent API that was introduced in Java 5, which makes writing concurrent code easier depending on your use cases.

  • Effective Java- Written by Joshua Bloch, who implemented major portions of the Java API. This is a lot of best practices for Java which are still applicable today (the book is 6 years old).

    Beyond either of those, though, I really wouldn't care about any other dead tree Java book. You'll probably spend significantly more time learning internal libraries and 3rd party stuff like Spring or Guice or Apache Commons or whatever your company uses.
u/lordlicorice · 3 pointsr/compsci

The absolute definitive book on multithreading in Java is the fantastic Java Concurrency in Practice. Just read it straight through.

It sounds like you have some more basic issues with understanding what threads even are though. Some of the other operating system focused resources might be a better place to start.

Did you go to college? I'm really surprised you're a programmer and you don't even know what a stack is.

u/chemosabe · 2 pointsr/java

> Oh boy, I know nothing about either of those things.

Get this book pronto. It's essential.

u/vix86 · 2 pointsr/learnprogramming

If you are using concurrency a lot then it might be worth it to take a look at: Java Concurrency in Practice (I believe that's the book I've seen recommended before.)

It's a little old but still mostly valid.

u/oorza · 2 pointsr/javahelp

Read, in this order:

  1. Thinking In Java.

  2. Effective Java

  3. Java Concurrency in Practice

    Those three books should get you wherever you need to be, without getting more specific books (e.g. framework books).
u/Chomskyismyhero · 2 pointsr/learnprogramming

Head First Java

Thinking in Java

Effective Java

Java Concurrency in Practice

Best $150 you'll ever spend. Read in order listed.

u/jopforodee · 2 pointsr/androiddev

I highly recommend Java Concurrency in Practice if you don't mind buying a book. http://smile.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601

It really demystified threading for me and I felt more comfortable with when something should be synchronized.

u/nutrecht · 2 pointsr/cscareerquestions

If you've worked with Java before this is a great book

u/xpto123 · 2 pointsr/java

I think Java Performance and Java Concurrency In Practice are two of the main ones. Especially JCIP is the reference for concurrent programming.

u/stefan_kurcubic · 2 pointsr/Clojure

i've been looking for comprehensive guide on clj concurrency

today i got https://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601

thank you for this

u/TheStudyOf_Wumbo · 2 pointsr/UofT

I type too much so I needed a second post

---

> And lastly, do you have any sources that you used to read up on multithreading?

I recommend doing the following:

If you know Java and want to see all the ways you can strangle yourself, this book has a lot of great things in it. It's quite readable and will likely scare you (for good reason...) into how dangerous multithreading can be. The book is hefty and requires Java, but the information is very practical.

If you want CSC369 notes from a really good textbook, the following chapters are relevant:

http://pages.cs.wisc.edu/~remzi/OSTEP/threads-intro.pdf

http://pages.cs.wisc.edu/~remzi/OSTEP/threads-api.pdf

http://pages.cs.wisc.edu/~remzi/OSTEP/threads-locks.pdf

http://pages.cs.wisc.edu/~remzi/OSTEP/threads-locks-usage.pdf

http://pages.cs.wisc.edu/~remzi/OSTEP/threads-sema.pdf

http://pages.cs.wisc.edu/~remzi/OSTEP/threads-cv.pdf

http://pages.cs.wisc.edu/~remzi/OSTEP/threads-bugs.pdf

http://pages.cs.wisc.edu/~remzi/OSTEP/threads-events.pdf

You can casually read the above. You don't need to actively code or anything... and the style is very laid back and enjoyable to consume. Each chapter should take you ~40-60 minutes to do, so you can do one a day over the summer and be done in a week.

If you want the 369 notes, these are relevant lectures which cover the above chapters:

http://www.teach.cs.toronto.edu/~csc369h/winter/lectures/w3/L3-Synch.pdf

http://www.teach.cs.toronto.edu/~csc369h/winter/lectures/w4/L4-Synch.pdf

The above may be a good refresher after you've done the textbook spam I posted above.

All of these links are from the CSC369 webpage here: http://www.teach.cs.toronto.edu/~csc369h/winter/lectures.html

LASTLY make sure to read up on the language you plan to use and explore its concurrency library.

Now that you have the knowledge, go write something that does this. Find a cool topic where you have tasks that could use multiple threads to go faster and make some cool stuff.

=============================================

Some final notes because this took a while to type up and I have to go have lunch:

  • Don't throw your health away over stuff (start exercising and eating healthy)

  • Do not mentally burn out over the summer while doing this

  • You will find you will only succeed at projects you are excited for, if you choose to make a project without really high enthusiasm you will burn out and hate yourself... so find something really interesting

  • Talk to other programmers if you can, become friends with lead devs in projects if possible

  • I'll say it again because it's very important, avoid burnout... don't do more than 8-9 hours of hard work per day, you probably won't absorb the rest anyways

    I didn't proof read anything so enjoy the typos, spent too much time writing posts

    EDIT (I lied): Don't forget that luck plays a large factor in the interview, you can have everything and you could be asked some stupid question. Therefore it's not worth killing yourself over since you could grind like mad and have luck just not be on your side (and this is why you should apply to as many companies with interesting jobs as possible)
u/KagakuNinja · 2 pointsr/learnprogramming

I personally always use an IDE, because you will soon discover that there are dozens of libraries used by real world projects, and you cannot possibly know everything about them. However, IDEs have options to turn off autocomplete, incremental compilation and syntax highlighting, if you are a masochist... Google is your friend.

I read Algorithims in C++ by Sedgewick, and it was great, but not important for learning to code. You need to know the basic concepts of: the Java standard library, especially collections, looping constructs, etc. Any good tutorial should cover these. General CS knowledge is great and you will be quizzed about it in interviews. However, not necessary when starting out.

Eventually you will need to know about the Java memory model, concurrency and thread safety this was the Bible back in the day, maybe there more up-to-date options.

Math is an interesting topic; in college, you have to learn calculus, which is where many of us decide that we don't like math. This is a pity, since programming is applied math. Also, math gets more interesting, but often weird, when you start studying upper division topics.

Most data structures are based on set theory and relations, which are taught in Discrete Math. To understand what a function is, you need to know about Set Theory and/or Category Theory. Category Theory is fascinating, and particularly important for understanding functional programming. This is a great resource. To understand graphics, you need to know about Geometry and Linear Algebra.

It also helps to understand the basics of Probability, Combinatorics and Abstract Algebra. All of this math is advanced stuff however, most programmers don't need to know any of that...

u/phao · 2 pointsr/java

A lot of doing java programming right is understanding how things are commonly (effectively) done in Java (and in languages with similar set of features).

Regardless of anyone's opinions, a lot of that has to do with learning common design patterns, mainly the ones on the Design Patterns book (gang of four; http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612/). Although the patterns in the book are just the starting point, it seems to be pretty good in terms of getting you up to speed with what some people tried (and are trying) to do with the design patterns movement, although there is significant disagreement.

There is also concurrency. This is a big thing in Java. A lot of the design of libraries and frameworks in Java are about dealing with concurrency issues. Server applications have to inherently deal with it, and this is where Java is mostly used. Although it's also a language independent subject, it's worth studying it applied to Java. A commonly recommended book is this one: http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601/.

The issue with all of this is that what I'm basically telling you is that "a large part of learning how to program in Java is to learn how to program", which isn't very helpful on its own. However, it's something I believe a lot of people miss. The focus on the language can be (it isn't necessarily) a symptom of that.

u/el_chief · 2 pointsr/java
u/LucidityWaver · 2 pointsr/learnjava

This seems to have been recommended quite a few times on Java related subreddits: http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601

u/sleepybychoice · 1 pointr/learnprogramming

Do you have anything specific you want to improve on?

Here's a few that I liked that are specific to Java:

u/sonay · 1 pointr/linux

If you want to program in Java, I would also suggest IntelliJ Idea. Community edition^[1] is free. Oracle docs are fine^[2], javadocs^[3] are great and the source is free for OpenJDK and if you want to go pro I highly recommend Effective Java^[4] by Joshua Bloch. There is also Findbugs^[5] which is cool for static analysis and most of the popular IDEs have plugins for it. You should also check Concurrency In Practice^[6] for multithreaded programming. If you are into web programming, I highly suggest Head First Servlets and JSP^[7]. There are also very good libraries such as Google Guava, Apache Commons etc.

  1. http://www.jetbrains.com/idea/features/editions_comparison_matrix.html
  2. http://docs.oracle.com/javase/tutorial/
  3. http://docs.oracle.com/javase/7/docs/api/
  4. http://www.amazon.com/Effective-Java-Edition-Joshua-Bloch/dp/0321356683
  5. http://findbugs.sourceforge.net/
  6. http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601
  7. http://www.amazon.com/Head-First-Servlets-JSP-Certified/dp/0596516681

u/sankyo · 1 pointr/Clojure

In short, unless you spend all of your time writing boring, vanilla business logic, you will spend a lot of time with your fact in this book "Java Concurrency in practice" by Brian Goetz, which is a good book, but at some point you may wonder just what the hell you are doing with your life and if programming with thread has to be so complicated.

Pretty sure Rich already did this and we can learn from his journey.

u/lbkulinski · 1 pointr/java

Yeah! Great book! Currently discounted on Amazon.

u/phonyphonecall · 1 pointr/java

Highly recommend learning it right the first time by reading Java Concurrency in Practice.

u/jj2parkie · 1 pointr/learnprogramming

I started programming in Java few months ago to develop Android applications. These are the resources I used:

  • Java 8 Pocket Guide: This book is very short in length and paper size. It is great to learn the syntax of Java 8 really fast with a general overview of the core libraries in Java SE 8.
  • Effective Java (2nd Edition): After learning the syntax of Java 8, this classic book discusses the best practices of using the Java language in a list of around 78 items. For example, "Item 1" is "Consider static factory methods instead of constructors", and then it explains why.
  • Java Concurrency in Practice: This book is also another classic which a lot of people use to learn concurrent programming for the Java language. It's a difficult book for me: very technical.
    • Introduction to Rx: Netflix has ported the Reactive Extensions library from the .NET platform to the JVM which you can find here: RxJava. It's Wiki with their marble diagrams are amazing. It allows a lot of the new features of Java 8 such as lambdas to utilize functional reactive programming for the Java language. It's all about Observables, and it's main purpose behind its development was to allow the Netflix team to prevent everyone from reading Java Concurrency in Practice as it trivializes concurrency especially for medium to large systems.
  • Clean Code: A Handbook of Agile Software Craftsmanship: This book is also another classic. It uses Java I believe for the examples. A lot of people love this book as a higher level supplement to Effective Java (I think) because it covers best practices for the Java language in designing code for emerging systems or scale-able systems and other topics like TDD.
  • Design Patterns: Elements of Reusable Object-Oriented Software: This book is the classic book (emphasis on "the"). It lists a lot of design patterns which you can use for languages like Java or others. The samples are written in C++ so since you have an experience with C, it can help. I loved this book for learning about Factories, Singletons, Decorators, Observers, Adapters, and more. Using design patterns really helped me solve design problems in my Android application so that it can be easily refractorable.
  • Introduction to Algorithms: The classic standard algorithms and data structures book I suggest if you are not familiar with them. Knowing the concepts can help fine tune your applications performance wise even if you do not implement any algorithms or data structures yourself.
  • Software Engineering: A Practitioner's Approach: A kind-of classic book about the software engineering profession. Its five parts are the following: "The Software Process", "Modeling", "Quality Management", "Managing Software Projects", and "Advanced Topics". Along the way through the book you gain a general understanding of how to write requirements, UML diagrams, and the like.

    All of these books except for the first are near 400 pages each. However, most of them do not require you to read all of it. It would be great to read them entirely, but you can still make do by reading the sections you need the most. A lot of the books listed as classics are books I found that a lot of universities use as I was browsing some curricula. This list focuses upon general programming as I believe mobile development and web development are just learning how to use frameworks which I consider trivial to learn generally since a lot of people say that if they work a place that uses framework X, their workplace gives them some time to brush up or get up-to-speed with the framework and how to use it over a few days unless you require a niche or complex solution to a problem.

    If you are not a huge fan of books, searching these titles will probably provide online tutorials or videos. The Amazon links can provide great reviews and suggestions. I like the books even if they are a bit long because of their professionalism, review, and rigor associated with the publication process of these textbooks that inhibits the rise of bad habits which might be introduced by online sources.

    I do not know your background with these topics, so you may already know the, but these are the resources I think which really helps people transition from just knowing syntax as "knowing a language" which they translate to "I'm proficient in X because I can write a program which allows you to save text to a file" to knowing a language regarding software engineering concepts which helps you work properly on projects medium to large projects you would find in a workplace as an intern maybe entry-level employee (but more formal education might be required).

    However, I'm pretty much like a high school student (took a year off before starting college to recover from an illness), so take my advice with a lot of salt, but these books which I couldn't apply 100% helped me make a small-medium sized Android application: https://github.com/jparkie/Aizoban which was designed enough to allow me to manage refractoring to introduce new features or fix issues which I believe would have been impossible if I hacked my way through to write around 35,000 lines of code.
u/kylebalkissoon · 1 pointr/algotrading
u/MassiveDiarrhea · 1 pointr/java
u/Yithar · 1 pointr/javahelp

https://www.amazon.com/Functional-Programming-Java-Harnessing-Expressions/dp/1937785467
https://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601

First book deals with Functional Programming in Java, which is another way of doing things compared to the Object-Oriented Paradigm.

Second book deals with Concurrency, which is a really important topic imo.

u/Patman128 · 1 pointr/node

> But it is still a lot more complicated that just letting the computer handle multithreading for you like you would in Java, C#, python

Not at all. Java Concurrency In Practice is 384 pages long for a reason. The way Node does concurrency is way simpler than using threads with manual synchronization.

u/balefrost · 1 pointr/learnprogramming

I only skimmed your code, because there's a lot of code there.

In general, there are two ways that threads communicate with each other:

  1. Setting state that is visible to the other thread
  2. Waiting for signals

    In fact, most concurrency constructs involve both. For example, a Semaphore class depends on all threads being able to see the number of available permits and, if no permits are available at the time that acquire is called, depends on being signaled when a permit is made available.

    Concurrency is hard to get right, even for developers with a lot of experience. It's easy to write code that appears to work, but which has a hidden concurrency bug. I'd posit that the mental model that most developers have about memory visibility in Java isn't quite accurate.

    For your case, probably the easiest approach is to use something like a BlockingQueue (perhaps in the form of a LinkedBlockingQueue or, if you know you can process messages faster than they arrive or are OK with dropping messages, an ArrayBlockingQueue). Have threads communicate by sending messages to each other through these queues, and otherwise share as little state as possible. Make sure that each thread does periodically check its queue for more messages. This is the model adopted by other programming languages that emphasize concurrency, like Erlang and Go.

    For more information, the book Java Concurrency in Practice is excellent. I highly recommend it.
u/kanak · 1 pointr/programming

If you know Java, check out Java Concurrency in Practice by Brian Goetz, Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes, and Doug Lea.

u/jumpkick · 1 pointr/androiddev

Buy this book: http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601 read chapters 1-5. Then read chapters 1-5 again.

Edit: it'll be the best $35 you'll ever spend on a Java book. When I interview people for position on my (Android dev) team, I specifically ask them concurrency questions. Knowing and understanding Java concurrency is an absolute must for professional Android development.

u/zoqfotpik · 1 pointr/cscareerquestions

If you think you know Java, then read Effective Java.

Once you're through reading that, and you think that now you really know Java, read Java Concurrency in Practice.

There may be something more than these that's worth reading, but I haven't found it yet.