From the course: Python Parallel and Concurrent Programming Part 1

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Multiple threads: Python demo

Multiple threads: Python demo - Python Tutorial

From the course: Python Parallel and Concurrent Programming Part 1

Start my 1-month free trial

Multiple threads: Python demo

- [Man] We'll start with a demonstration, using Python's threading module to create several concurrent threads and investigate their impact on this computer's CPU usage. But before diving into code, let's first take a look at the number of processors that are available on this computer, which I'll be using for demonstrations throughout this course. To do that, I'll press control, shift, escape to open the task manager, and then select the performance tab. Down at the bottom, I can see that this computer has 12 cores and 24 logical processors. Those numbers mean this computer has 12 separate, complete physical processing cores, and each of those cores supports something called hyper-threading, which enables them to each run two independent applications, at the same time. So the computer treats those 12 physical cores, as 24 logical processors. Now, the hyper-threading in those 12 cores, does not mean I'll get double the…

Contents