This is a quick and handy course with exactly what you need to know (nothing more, nothing less!) about multithreading and concurrency in Java
Let’s parse that.
Using discussion forums
Please use the discussion forums on this course to engage with other students and to help each other out. Unfortunately, much as we would like to, it is not possible for us at Loonycorn to respond to individual questions from students:-(
We're super small and self-funded with only 2 people developing technical video content. Our mission is to make high-quality courses available at super low prices.
The only way to keep our prices this low is to *NOT offer additional technical support over email or in-person*. The truth is, direct support is hugely expensive and just does not scale.
We understand that this is not ideal and that a lot of students might benefit from this additional support. Hiring resources for additional support would make our offering much more expensive, thus defeating our original purpose.
It is a hard trade-off.
Thank you for your patience and understanding!
As computers have become multi-core, and then as cloud computing has taken off, the importance of threading has increased substantially. This lecture is an introduction to the concept of threading which allows programmers to do different things simultaneously. We will also discuss the differences between processes and threads, old school concepts vs new school concepts in threads and some use-cases of threads.
We'll talk about a specific use case for threading where spinning off multiple threads can give us huge performance gains. Java support for threading is great even in its traditional form. New libraries however, make working with threads far easier.
We study threading the way it has traditionally been done in Java - the Runnable interface; extending the Thread class; join(), sleep() and thread interrupts.
Methods can be marked as synchronized - we study the nuances of doing so. We also examine threading issues such as livelock, deadlock and starvation.
We continue with our drill, and use our first lock. We learn yet another important thread-related lesson - that static variables can not be locked using the synchronized keyword.
In this lecture, we will talk about new features of Java which significantly improves its support for concurrency - the Callable interface,executors,thread pools, lock objects, concurrent collections and atomic variables. We will show how these new features make multi-threading a lot more robust.
We go back and reprise our threading drill, but this time we do so using the new threading framework - Callables instead of Runnables, and Executors instead of the Thread objects, and Future objects to retrieve the results.
We now delve into the power of the new threading features - a CompletionService, for instance, which allows us to retrieve results from threads in the order in which they complete.
The Singleton Pattern is beautiful - a unique object, usually implemented via a private constructor and a static getter method.
The Singleton Pattern is very elegant in its construction, but there are important nuances that we should be aware of, specifically related to multi-threading and to class loaders in Java. In this lecture, we explore how a concurrency-related Design Pattern called Double-Checked Locking can come in handy while implementing the Singleton in a multi-threaded environment.
Loonycorn is us, Janani Ravi and Vitthal Srinivasan. Between us, we have studied at Stanford, been admitted to IIM Ahmedabad and have spent years working in tech, in the Bay Area, New York, Singapore and Bangalore.
Janani: 7 years at Google (New York, Singapore); Studied at Stanford; also worked at Flipkart and Microsoft
Vitthal: Also Google (Singapore) and studied at Stanford; Flipkart, Credit Suisse and INSEAD too
We think we might have hit upon a neat way of teaching complicated tech courses in a funny, practical, engaging way, which is why we are so excited to be here on Udemy!
We hope you will try our offerings, and think you'll like them :-)