Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
B11327_Mastering Concurrency in Python
Table of Contents
Preface
Concurrent and Parallel Programming - An Advanced Introduction
What is concurrency?
Concurrent vs. Sequential
Concurrent versus parallel
Not everything should be made concurrent
Embarrassingly parallel
Inherently sequential
I/O bound
The history, present, and future of concurrency
The history
The present
The future
A brief overview of mastering concurrency in Python
Setting up your Python environment
Summary
Questions
Further reading
Amdahl's Law
Technical requirements
Amdahl’s law
Terminologies
Formula and interpretation
Formula of Amdahl's law
A quick example
Implications
Relation to the law of diminishing returns
Simulation in Python
Summary
Questions
Further reading
Working with Threads in Python
Technical requirements
The Concept of a Thread
Threads versus Processes
Multithreading
Introductory example in Python
An overview of the threading module
The thread module in Python 2
The threading module in Python 3
Creating a new thread in Python
Starting a thread with the thread module
Starting a thread with the threading module
Synchronizing threads
The concept of thread synchronization
The threading.Lock class
Example in Python
Multithreaded priority queue
A connection between real life and programatic queues
The queue module
Queue in concurrent programming
Multithreaded priority queue
Summary
Questions
Further reading
Using the ‘with’ Statement in Threads
Concurrent Web Scraping
Working with Processes in Python
The Reduction Operation in Processes
Concurrent Image Processing
Introduction to Asynchronous I/O
Asyncio – Pros and Cons
TCP with Asyncio
Deadlock
Starvation
Race Conditions
The Global Interpreter Lock
Designing Lock-Free and Lock-Based Concurrent Data Structures
Memory Models and Operations on Atomic Types
Building a Server from Scratch
Testing, Debugging, and Scheduling Concurrent Applications
← Prev
Back
Next →
← Prev
Back
Next →