__init__.py 887 B

1234567891011121314151617181920212223
  1. # Copyright 2009 Brian Quinlan. All Rights Reserved.
  2. # Licensed to PSF under a Contributor Agreement.
  3. """Execute computations asynchronously using threads or processes."""
  4. __author__ = 'Brian Quinlan (brian@sweetapp.com)'
  5. from concurrent.futures._base import (FIRST_COMPLETED,
  6. FIRST_EXCEPTION,
  7. ALL_COMPLETED,
  8. CancelledError,
  9. TimeoutError,
  10. Future,
  11. Executor,
  12. wait,
  13. as_completed)
  14. from concurrent.futures.thread import ThreadPoolExecutor
  15. try:
  16. from concurrent.futures.process import ProcessPoolExecutor
  17. except ImportError:
  18. # some platforms don't have multiprocessing
  19. pass