O'Reilly logo

Python Parallel Programming Cookbook by Giancarlo Zaccone

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the concurrent.futures Python modules

With the release of Python 3.2, the concurrent.future module was introduced, which allows us to manage concurrent programming tasks, such as process and thread pooling, nondeterministic execution flows, and processes and thread synchronization.

This package is built by the following classes:

  • concurrent.futures.Executor: This is an abstract class that provides methods to execute calls asynchronously.
  • submit (function ,argument): This schedules the execution of a function (called callable) on the arguments.
  • map (function,argument): This executes the function on arguments in an asynchronous mode.
  • shutdown (Wait = True): This signals the executor to free any resource.
  • concurrent.futures.Future: This encapsulates ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required