...

/

Multithreading Overview

Multithreading Overview

Learn what threads are and their importance in responsive applications.

Introduction

Modern applications perform many tasks at the same time. For instance, when we send a photo to our family members with a messenger application, we continue receiving messages while our photo is being uploaded. The method that uploads a photo and the method that receives a message run virtually in a simultaneous manner. Different parts of the system continue to operate at the same time because they run on separate threads. Utilizing several threads is called multithreading.

Note: Threads are unique execution paths with separate control flows. That is, threads don’t affect one another unless they use some common resource, like disk memory.

All code examples we’ve written so far run on a single thread. The subsequent line of code doesn’t run until the previous one ...

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy