##  Exception classes  Â¶

_ exception  _ concurrent.futures.  CancelledError  Â¶

    

Raised when a future is cancelled.

_ exception  _ concurrent.futures.  TimeoutError  Â¶

    

A deprecated alias of [ ` TimeoutError  ` ](exceptions.html#TimeoutError
"TimeoutError") , raised when a future operation exceeds the given timeout.

Changed in version 3.11:  This class was made an alias of [ ` TimeoutError  `
](exceptions.html#TimeoutError "TimeoutError") .

_ exception  _ concurrent.futures.  BrokenExecutor  Â¶

    

Derived from [ ` RuntimeError  ` ](exceptions.html#RuntimeError
"RuntimeError") , this exception class is raised when an executor is broken
for some reason, and cannot be used to submit or execute new tasks.

New in version 3.7.

_ exception  _ concurrent.futures.  InvalidStateError  Â¶

    

Raised when an operation is performed on a future that is not allowed in the
current state.

New in version 3.8.

_ exception  _ concurrent.futures.thread.  BrokenThreadPool  Â¶

    

Derived from  ` BrokenExecutor  ` , this exception class is raised when one of
the workers of a  ` ThreadPoolExecutor  ` has failed initializing.

New in version 3.7.

_ exception  _ concurrent.futures.process.  BrokenProcessPool  Â¶

    

Derived from  ` BrokenExecutor  ` (formerly [ ` RuntimeError  `
](exceptions.html#RuntimeError "RuntimeError") ), this exception class is
raised when one of the workers of a  ` ProcessPoolExecutor  ` has terminated
in a non-clean fashion (for example, if it was killed from the outside).

New in version 3.3.

###  [ Table of Contents ](../contents.html)

  * ` concurrent.futures  ` â Launching parallel tasks 
    * Executor Objects 
    * ThreadPoolExecutor 
      * ThreadPoolExecutor Example 
    * ProcessPoolExecutor 
      * ProcessPoolExecutor Example 
    * Future Objects 
    * Module Functions 
    * Exception classes 

####  Previous topic

[ The ` concurrent  ` package ](concurrent.html "previous chapter")

####  Next topic

[ ` subprocess  ` â Subprocess management ](subprocess.html "next chapter")

###  This Page

  * [ Report a Bug ](../bugs.html)
  * [ Show Source ](https://github.com/python/cpython/blob/main/Doc/library/concurrent.futures.rst)

Â«

###  Navigation

  * [ index ](../genindex.html "General Index")
  * [ modules ](../py-modindex.html "Python Module Index") | 
  * [ next ](subprocess.html "subprocess â Subprocess management") | 
  * [ previous ](concurrent.html "The concurrent package") | 
  * ![Python logo](../_static/py.svg)
  * [ Python ](https://www.python.org/) » 
  *   *   * [ 3.12.3 Documentation ](../index.html) » 
  * [ The Python Standard Library ](index.html) » 
  * [ Concurrent Execution ](concurrency.html) » 
  * [ ` concurrent.futures  ` â Launching parallel tasks ]()
  * | 
  * Theme  Auto  Light  Dark  | 

© [ Copyright ](../copyright.html) 2001-2024, Python Software Foundation.  
This page is licensed under the Python Software Foundation License Version 2.  
Examples, recipes, and other code in the documentation are additionally
licensed under the Zero Clause BSD License.  
See [ History and License ](/license.html) for more information.  
  
The Python Software Foundation is a non-profit corporation. [ Please donate.
](https://www.python.org/psf/donations/)  
  
Last updated on Apr 16, 2024 (06:11 UTC). [ Found a bug ](/bugs.html) ?  
Created using [ Sphinx ](https://www.sphinx-doc.org/) 7.2.6.