From the course: Rust for Data Engineering

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Core concepts in concurrency

Core concepts in concurrency - Rust Tutorial

From the course: Rust for Data Engineering

Core concepts in concurrency

- [Instructor] Let's take a look at some of the core concepts in concurrency by using a busy restaurant kitchen as an example. There's four key concepts here. First up, we have parallelism versus concurrency. Second, synchronization primitives. Third, message passing. And fourth, race conditions. So, if we take a look at the first one here, parallelism versus concurrency, let's take how a multiple cook scenario could really increase the parallelism versus a single cook that is multitasking between different dishes. This would be concurrency. So in the parallelism example here, each of the cooks could really make one part of the meal. So, you know, one could cook a steak, one could cook mashed potatoes, another one could cook a salad. And once they prepare that meal together, that's the finished level of parallelism. With concurrency here with a cook, the same cook would potentially put a, you know, steak on the…

Contents