##// END OF EJS Templates
futures: switch to absolute and relative imports...
Gregory Szorc -
r37644:0a9c0d34 default
parent child Browse files
Show More
@@ -3,9 +3,12 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,
10 from ._base import (
11 FIRST_COMPLETED,
9 12 FIRST_EXCEPTION,
10 13 ALL_COMPLETED,
11 14 CancelledError,
@@ -13,11 +16,12 b' from concurrent.futures._base import (FI'
13 16 Future,
14 17 Executor,
15 18 wait,
16 as_completed)
17 from concurrent.futures.thread import ThreadPoolExecutor
19 as_completed,
20 )
21 from .thread import ThreadPoolExecutor
18 22
19 23 try:
20 from concurrent.futures.process import ProcessPoolExecutor
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
@@ -43,8 +43,10 b' Process #1..n:'
43 43 _ResultItems in "Request Q"
44 44 """
45 45
46 from __future__ import absolute_import
47
46 48 import atexit
47 from concurrent.futures import _base
49 from . import _base
48 50 import Queue as queue
49 51 import multiprocessing
50 52 import threading
@@ -3,8 +3,10 b''
3 3
4 4 """Implements ThreadPoolExecutor."""
5 5
6 from __future__ import absolute_import
7
6 8 import atexit
7 from concurrent.futures import _base
9 from . import _base
8 10 import itertools
9 11 import Queue as queue
10 12 import threading
General Comments 0
You need to be logged in to leave comments. Login now