Tutorialspoint

April Learning Carnival is here, Use code FEST10 for an extra 10% off

Efficient Java Multithreading and Concurrency with Executors

person icon Arun Kumar

4

Efficient Java Multithreading and Concurrency with Executors

Learn to do everything with Executors that you can do with Threads

updated on icon Updated on Apr, 2024

language icon Language - English

person icon Arun Kumar

category icon Java Development,Java Programming,Multithreading,Performance,Java Technologies,

Lectures -62

Resources -2

Duration -5.5 hours

4

price-loader

30-days Money-Back Guarantee

Training 5 or more people ?

Get your team access to 10000+ top Tutorials Point courses anytime, anywhere.

Course Description

Learn all the concepts of Java's Executors API from scratch in combination with parallel concepts of the Threads API. Develop skills and deepen your knowledge of advanced multi-threading concepts by learning various tips & techniques and becoming aware of pitfalls when using Executors API. And ... refresh your advanced Threads-API concepts as well.

  • Do you know how to return values using the normal Threads API and its Runnables?
  • Do you know the various ways of terminating threads midway for both the APIs?
  • Do you know how to 'join threads' using Executors?
  • Do you know that you cannot catch stray exceptions leaked out from a thread by using try-catch block - neither in the Threads API nor in the Executors one? And that this can lead to third-party code killing your scalable, high-performance and high-availability enterprise application?
  • Do you know how to check if a task has finished execution using both the APIs?
  • Do you know what are daemon threads and how to create them using Executors?
  • Do you know how to name Executor threads?
  • Do you know the various ways to schedule tasks for running in future using both the APIs? Do you know the various 'types' of scheduling?


If the answer to any of these questions is 'no', then this course is for you (provided that you know Java and the basics of multi-threading already)! Learning from HD quality videos and nearly 6 hours of content will help you convert all these "nos" to "yeses" ... and will also give you an edge over your peers! Not only will this course help you learn how to get things done the multi-threaded way but also how to avoid the mistakes and pitfalls and thereby, increase your efficiency and productivity. All those long bug-fixing hours that you save can be spent finishing your other pending work or even for pleasure!


Avoid the pitfalls while writing multi-threaded code by learning pro-tips

In my 19 years of experience building large enterprise applications, I have made all the mistakes in multi-threading that can be made. And believe me - multi-threading bugs are costly and multi-weekend-destroying to resolve.

I have used my vast experience to craft this course in such a manner so as to highlight the pitfalls that await a programmer and also provide tips to avoid those pitfalls. By going through this course, you will be years ahead of your peers who are yet to make all the mistakes that I have made.


Content and Overview

It is difficult to directly move from an older to a newer way of doing things if you are not comfortable with the older way also - you won't be able to map things from the old way to the new way. So, this course has been structured in such a way that the Threads-API way of doing things are explained first and then the corresponding way to do them using the Executors-API is explained. This will help you understand not only the advanced concepts of Executors but also those of the Threads-API.

So, this course is suitable for programmers who want to learn about the Executors API from scratch. It is also beneficial for those who want to refresh their concepts or learn the techniques of doing various operations using the Threads-API. Detailed examples along with the source-code are provided on every concept for both the APIs.

The course starts with the basics first - 'How to create and run threads', 'How to name the threads' and 'How to return values from threads' - using both the APIs. And then, it gradually moves on to increasingly advanced concepts like 'Terminating Threads', 'Catching Exceptions', 'Waiting for threads to finish without wasting CPU cycles', etc.

BEFORE YOU BUY THIS COURSE, DON'T FORGET TO WATCH THE FREE PREVIEW VIDEO ON 'PRE-REQUISITES AND COURSE STRUCTURE' IN SECTION-1!

Goals

What will you learn in this course:

  • Exploit the ninja techniques learned from this course to write safe and error free multithreading code in the first iteration itself.

  • Become confident to move away from the old Threads-API and use the modern Executors-API for all multi-threading needs instead.

  • Understand and exploit the various pro techniques to avoid the pitfalls while using Executors.

  • Understand and leverage the similarities & differences between the Threads-API and the Executors-API.

  • Rightly judge which Executor pool to use for which needs.

  • Differentiate between safe and error-prone multi-threading code.

  • Appreciate the reasons why Executors API was built even though the Threads API already existed.

  • Write efficient multi-threading code by utilizing a plethora of pro tips and techniques.

  • Get the Source Code of all the examples!

Prerequisites

What are the prerequisites for this course?

  • You should already have a solid grasp of Core Java.

  • You should already know about the basic concepts of multi-threading viz. what are threads, why are threads required, various states they can be in, what is synchronization, what is locking, etc.

  • You should have Eclipse IDE and JDK 1.8 or higher installed on your machine.

  • You should already know how to use Eclipse IDE for Java programming.

Efficient Java Multithreading and Concurrency with Executors

Curriculum

Check out the detailed breakdown of what’s inside the course

INTRODUCTION
2 Lectures
  • play icon Course Introduction 03:26 03:26
  • play icon Pre-Requisites and Course Structure 03:18 03:18
CREATING AND RUNNING THE THREADS
11 Lectures
Tutorialspoint
NAMING THE THREADS - HOW AND WHY
5 Lectures
Tutorialspoint
RETURNING VALUES FROM THREADS
5 Lectures
Tutorialspoint
DAEMON THREADS
3 Lectures
Tutorialspoint
THREAD LIVENESS
3 Lectures
Tutorialspoint
TERMINATING THREADS
9 Lectures
Tutorialspoint
HANDLING THREAD EXCEPTIONS
7 Lectures
Tutorialspoint
WAITING FOR THREADS TO FINISH
4 Lectures
Tutorialspoint
SCHEDULING TASKS
11 Lectures
Tutorialspoint
EXERCISES and SOURCE CODE
2 Lectures
Tutorialspoint

Instructor Details

Arun Kumar

Arun Kumar

e


Course Certificate

Use your certificate to make a career change or to advance in your current career.

sample Tutorialspoint certificate

Our students work
with the Best

Related Video Courses

View More

Annual Membership

Become a valued member of Tutorials Point and enjoy unlimited access to our vast library of top-rated Video Courses

Subscribe now
Annual Membership

Online Certifications

Master prominent technologies at full length and become a valued certified professional.

Explore Now
Online Certifications

Talk to us

1800-202-0515