Skip to Content
Software Architecture with Python
book

Software Architecture with Python

by Anand Balachandran Pillai
April 2017
Intermediate to advanced
556 pages
11h 5m
English
Packt Publishing
Content preview from Software Architecture with Python

Concurrent futures – high-level concurrent processing

The concurrent.futures module provides high-level concurrent processing using either threads or processes, while asynchronously returning data using future objects.

It provides an executor interface which exposes mainly two methods, which are as follows:

  • submit: Submits a callable to be executed asynchronously, returning a future object representing the execution of the callable.
  • map: Maps a callable to a set of iterables, scheduling the execution asynchronously in the future object. However, this method returns the results of processing directly instead of returning a list of futures.

There are two concrete implementations of the executor interface: ThreadPoolExecutor executes the callable in ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Architecture Patterns with Python

Architecture Patterns with Python

Harry Percival, Bob Gregory

Publisher Resources

ISBN: 9781786468529Supplemental Content