Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Java Concurrency and Multithreading in Practice
Rating: 3.3 out of 5(6 ratings)
46 students

Java Concurrency and Multithreading in Practice

Improve the performance of your application by using modern Java's multithreading features
Last updated 11/2019
English
English

What you'll learn

  • Build efficient and elegant code with popular parallel Java frameworks, including ForkJoin and Streams
  • Master Reactive Streams to process data
  • Explore the existing thread-safe collections and types, to avoid reinventing the wheel
  • Understand how threads work in Java and how to manage them
  • Leverage multithreading to increase your application's performance

Course content

5 sections • 24 lectures • 2h 20m total length
  • The Course Overview4:00

    This video will give you an overview about the course.

  • Executing Tasks in Parallel with ForkJoinPool4:58

    Running tasks in parallel can make a program run much faster. We will implement and execute our first parallel task, where the parallelism is achieved with just a few lines of code.

       •  Create your first parallel task - implement the Callable interface for now

       •  Get an instance of a ForkJoinPool, where the tasks will be executed

       •  Start the tasks in parallel with invokeAll()

  • Joining the Results of the Tasks8:53

    Take our first parallel task one step further and combine results of individual subtasks into a single final result.

       •  Create a RecursiveTask

       •  Spin off subtasks with a fork() method

       •  Collect results with the join() method

  • RecursiveAction and RecursiveTask8:04

    RecursiveAction is powerful, but the ForkJoin framework has a lot more to offer. Here, we shall implement a new kind of a task and experiment with other methods provided by the framework.

       •  Go beyond RecursiveTask and explore ForkJoinTask

       •  Create a RecursiveAction

       •  Play with different methods on the ForkJoinPool

  • Exception Handling and Cancelling a Task4:54

    Life happens and sometimes exceptions are thrown. We will experiment with different exceptions in this video.

       •  Create a task throwing an unchecked exception, see how it affects other subtasks

       •  Handle a checked exception inside the ForkJoinTask.compute() method

       •  Cancel a task and see what happens with the execution

  • Test Your Knowledge

Requirements

  • Some basic workable knowledge of Java is assumed.

Description

Multi-core processors are everywhere—from super-computers to mobile devices right in your pocket. That's why a modern developer must know how to leverage the power of multithreading.

This course will teach you how to use parallelism and concurrency in Java. You will learn how to parallelize tasks and functions with the ForkJoin framework and Streams. You will also learn how to work with the very popular Reactive Streams recently introduced to Java. Furthermore, you will master concurrent collections and lower-level synchronization techniques with locks.

This course conveniently provides quizzes to evaluate your knowledge and help you retain the new concepts.

By the end of this practical training course, you will have the knowledge to write elegant programs for multicore computers with enhanced performance and improved responsiveness.

This tutorial covers the vital concepts of multithreading and concurrency in Java with useful examples. You'll work with multithreaded programs to learn core concurrency concepts and how to apply them to your own projects.

About the Author

Tatiana Fesenko is a senior Java developer with a proven track record of bringing products from concept to implementation and a background that includes working in four countries with collaborators from almost all continents in corporate, semi-public, and start-up environments. She is highly driven, thorough, and passionate about technology, and has been professionally using Java for more than 15 years.

Who this course is for:

  • If you are a Java developer keen to learn how to write modern parallel and concurrent programs to improve application performance, this course is for you.