Show More
@@ -3,21 +3,25 b'' | |||
|
3 | 3 | |
|
4 | 4 | """Execute computations asynchronously using threads or processes.""" |
|
5 | 5 | |
|
6 | from __future__ import absolute_import | |
|
7 | ||
|
6 | 8 | __author__ = 'Brian Quinlan (brian@sweetapp.com)' |
|
7 | 9 | |
|
8 | from concurrent.futures._base import (FIRST_COMPLETED, | |
|
9 | FIRST_EXCEPTION, | |
|
10 | ALL_COMPLETED, | |
|
11 | CancelledError, | |
|
12 | TimeoutError, | |
|
13 | Future, | |
|
14 | Executor, | |
|
15 | wait, | |
|
16 | as_completed) | |
|
17 | from concurrent.futures.thread import ThreadPoolExecutor | |
|
10 | from ._base import ( | |
|
11 | FIRST_COMPLETED, | |
|
12 | FIRST_EXCEPTION, | |
|
13 | ALL_COMPLETED, | |
|
14 | CancelledError, | |
|
15 | TimeoutError, | |
|
16 | Future, | |
|
17 | Executor, | |
|
18 | wait, | |
|
19 | as_completed, | |
|
20 | ) | |
|
21 | from .thread import ThreadPoolExecutor | |
|
18 | 22 | |
|
19 | 23 | try: |
|
20 |
from |
|
|
24 | from .process import ProcessPoolExecutor | |
|
21 | 25 | except ImportError: |
|
22 | 26 | # some platforms don't have multiprocessing |
|
23 | 27 | pass |
@@ -1,6 +1,8 b'' | |||
|
1 | 1 | # Copyright 2009 Brian Quinlan. All Rights Reserved. |
|
2 | 2 | # Licensed to PSF under a Contributor Agreement. |
|
3 | 3 | |
|
4 | from __future__ import absolute_import | |
|
5 | ||
|
4 | 6 | import collections |
|
5 | 7 | import logging |
|
6 | 8 | import threading |
General Comments 0
You need to be logged in to leave comments.
Login now