r/learnjava • u/[deleted] • Jan 24 '21
Best resources to learn multithreading?
Hi! I have a few years of experience now, mostly in Java and I’d like get a better understanding of how threads work and how to leverage them. What resources helped you learn?
6
u/ixBerry Jan 24 '21
There are tons of resources. The absolute best resource I learnt this from was Prof. Vivek Sarkar's Coursera specialisation on Concurrent, Parallel and Distributed programming in Java. Its pretty easy to digest and while not super deep, prof Sarkar covers the concepts really well, and you will be able to establish as solid understanding of the concepts.
Apart from that, I found that I learnt most of multithreading through several iterations and writing specific code at work.
Some of the best excercises you can implement are to implement the Thread safe datastructures from the java.util library yourself. You can then test it and also see the source code to compare your solutions.
1
Jan 24 '21
Thanks! It would have never occurred to me to implement those data structures, great idea.
1
1
3
u/GreenParsley Jan 25 '21
Concurrency in practice by Brian Goetz is a great book. It gives a lot of examples and explanations on what to and not to do, so if books are your thing you can check it out. Though multithreading in java is a vast topic so expect to use multiple resources at once. Or should I say "concurrently"?
1
u/ixBerry Jan 25 '21
Concurrency in practice is not a starter book at all. You read CIP to master concurrency, not to learn it.
1
1
u/pan_zych Jan 25 '21
I like this tutorial page: http://tutorials.jenkov.com/java-concurrency/index.html
14
u/jangirakah Jan 24 '21
I am not good with books, but tutorials do help me a lot. I think you should try Pluralsight's courses. Prof. Jose Paumard has three awesome courses covering from basic to somewhat advanced concepts. I am certain you will get a great depth of knowledge yo build on top of it. Good luck!