Learning Concurrency in Python

Practically and deeply understand concurrency in Python to write efficient programs
Preview in Mapt

Learning Concurrency in Python

Elliot Forbes

1 customer reviews
Practically and deeply understand concurrency in Python to write efficient programs
Mapt Subscription
FREE
$29.99/m after trial
eBook
$25.20
RRP $35.99
Save 29%
Print + eBook
$44.99
RRP $44.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$25.20
$44.99
$29.99p/m after trial
RRP $35.99
RRP $44.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Learning Concurrency in Python Book Cover
Learning Concurrency in Python
$ 35.99
$ 25.20
Learning scikit-learn: Machine Learning in Python Book Cover
Learning scikit-learn: Machine Learning in Python
$ 17.99
$ 12.60
Buy 2 for $30.10
Save $23.88
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781787285378
Paperback313 pages

Book Description

Python is a very high level, general purpose language that is utilized heavily in fields such as data science and research, as well as being one of the top choices for general purpose programming for programmers around the world. It features a wide number of powerful, high and low-level libraries and frameworks that complement its delightful syntax and enable Python programmers to create.

This book introduces some of the most popular libraries and frameworks and goes in-depth into how you can leverage these libraries for your own high-concurrent, highly-performant Python programs. We'll cover the fundamental concepts of concurrency needed to be able to write your own concurrent and parallel software systems in Python.

The book will guide you down the path to mastering Python concurrency, giving you all the necessary hardware and theoretical knowledge. We'll cover concepts such as debugging and exception handling as well as some of the most popular libraries and frameworks that allow you to create event-driven and reactive systems.

By the end of the book, you'll have learned the techniques to write incredibly efficient concurrent systems that follow best practices.

Table of Contents

Chapter 1: Speed It Up!
History of concurrency
Threads and multithreading
Processes
Multiprocessing
Reactive programming
GPU programming
The limitations of Python
Concurrent image download
Improving number crunching with multiprocessing
Summary
Chapter 2: Parallelize It
Understanding concurrency
I/O bottlenecks
Understanding parallelism
How do they work on a CPU?
System architecture styles
Computer memory architecture styles
Summary
Chapter 3: Life of a Thread
Threads in Python
Handling threads in Python
How does the operating system handle threads
Multithreading models
Summary
Chapter 4: Synchronization between Threads
Synchronization between threads
Shared resources and data races
Summary
Chapter 5: Communication between Threads
Standard data structures
Defining your own thread-safe communication structures
Summary
Chapter 6: Debug and Benchmark
Testing strategies
Debugging
Benchmarking
Profiling
Summary
Chapter 7: Executors and Pools
Concurrent futures
Future objects
ProcessPoolExecutor
Improving our crawler
concurrent.futures in Python 2.7
Summary
Chapter 8: Multiprocessing
Working around the GIL
The life of a process
Multiprocessing pools
Communication between processes
Multiprocessing managers
Communicating sequential processes
Summary
Chapter 9: Event-Driven Programming
Event-driven programming
Asyncio
Debugging asyncio programs
Twisted
Gevent
Summary
Chapter 10: Reactive Programming
Basic reactive programming
ReactiveX, or RX
PyFunctional
Summary
Chapter 11: Using the GPU
Basic reactive programming
ReactiveX, or RX
PyFunctional
Summary
Chapter 12: Choosing a Solution
Libraries not covered in this book
Designing your systems
Summary

What You Will Learn

  • Explore the concept of threading and multiprocessing in Python
  • Understand concurrency with threads
  • Manage exceptions in child threads
  • Handle the hardest part in a concurrent system — shared resources
  • Build concurrent systems with Communicating Sequential Processes (CSP)
  • Maintain all concurrent systems and master them
  • Apply reactive programming to build concurrent systems
  • Use GPU to solve specific problems

Authors

Table of Contents

Chapter 1: Speed It Up!
History of concurrency
Threads and multithreading
Processes
Multiprocessing
Reactive programming
GPU programming
The limitations of Python
Concurrent image download
Improving number crunching with multiprocessing
Summary
Chapter 2: Parallelize It
Understanding concurrency
I/O bottlenecks
Understanding parallelism
How do they work on a CPU?
System architecture styles
Computer memory architecture styles
Summary
Chapter 3: Life of a Thread
Threads in Python
Handling threads in Python
How does the operating system handle threads
Multithreading models
Summary
Chapter 4: Synchronization between Threads
Synchronization between threads
Shared resources and data races
Summary
Chapter 5: Communication between Threads
Standard data structures
Defining your own thread-safe communication structures
Summary
Chapter 6: Debug and Benchmark
Testing strategies
Debugging
Benchmarking
Profiling
Summary
Chapter 7: Executors and Pools
Concurrent futures
Future objects
ProcessPoolExecutor
Improving our crawler
concurrent.futures in Python 2.7
Summary
Chapter 8: Multiprocessing
Working around the GIL
The life of a process
Multiprocessing pools
Communication between processes
Multiprocessing managers
Communicating sequential processes
Summary
Chapter 9: Event-Driven Programming
Event-driven programming
Asyncio
Debugging asyncio programs
Twisted
Gevent
Summary
Chapter 10: Reactive Programming
Basic reactive programming
ReactiveX, or RX
PyFunctional
Summary
Chapter 11: Using the GPU
Basic reactive programming
ReactiveX, or RX
PyFunctional
Summary
Chapter 12: Choosing a Solution
Libraries not covered in this book
Designing your systems
Summary

Book Details

ISBN 139781787285378
Paperback313 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Mastering Python Book Cover
Mastering Python
$ 31.99
$ 22.40
Modern Python Cookbook Book Cover
Modern Python Cookbook
$ 39.99
$ 28.00
Python Machine Learning Book Cover
Python Machine Learning
$ 35.99
$ 25.20
Expert Python Programming - Second Edition Book Cover
Expert Python Programming - Second Edition
$ 35.99
$ 25.20
Learning scikit-learn: Machine Learning in Python Book Cover
Learning scikit-learn: Machine Learning in Python
$ 17.99
$ 12.60
Learn Python in 7 Days Book Cover
Learn Python in 7 Days
$ 31.99
$ 22.40