Parallel and Concurrent Programming: Lesson
Lesson 1 of 1
  1. 1
    In Intermediate Java, we learned how to implement concurrent threading by using Threads and Synchronization. We’ll cover a few more implementations for that, however, under normal circumstances, mo…
  2. 2
    As your programs grow, it gets harder to manage all your threads, especially if you’re manually creating them as needed and joining them on an, even more, as-needed basis. However, this feels tedio…
  3. 3
    The Executor framework implements thread pooling through an Executor interface. Using it is fairly intuitive and draws on already pre-existing functionality found in the Thread class, and the execu…
  4. 4
    A similar interface to the executor service was added in Java 7 that included functionality to split a task into smaller subtasks and re-enqueue them into the thread pool. This is particularly usef…
  5. 5
    So far, we’ve seen that parallelism is hard to come by. The biggest reason for this is the innate issue of making something “thread-safe.” If something is thread-safe, then multiple threads can int…
  6. 6
    To explain what parallel streams are, we need to first talk about what exactly a Java Stream is. Java Streams were introduced in Java 8, and are used to process a collection of objects which can …
  7. 7
    Now that we know what Java Streams are and how they work, we can start to understand why they’re good for parallel processing. They ultimately don’t alter the original object passed to them, which …
  8. 8
    Congratulations! You completed the lesson on parallel and concurrent programming! 🙌 Key concepts covered in this lesson: - What Concurrency and Parallelism are and what their differences are - T…

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo