Fix Futures py2
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
|
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
|
||||||
|
|
||||||
from concurrent.futures._base import (FIRST_COMPLETED,
|
from concurrent_py2.futures._base import (FIRST_COMPLETED,
|
||||||
FIRST_EXCEPTION,
|
FIRST_EXCEPTION,
|
||||||
ALL_COMPLETED,
|
ALL_COMPLETED,
|
||||||
CancelledError,
|
CancelledError,
|
||||||
@@ -14,10 +14,10 @@ from concurrent.futures._base import (FIRST_COMPLETED,
|
|||||||
Executor,
|
Executor,
|
||||||
wait,
|
wait,
|
||||||
as_completed)
|
as_completed)
|
||||||
from concurrent.futures.thread import ThreadPoolExecutor
|
from concurrent_py2.futures.thread import ThreadPoolExecutor
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from concurrent.futures.process import ProcessPoolExecutor
|
from concurrent_py2.futures.process import ProcessPoolExecutor
|
||||||
except ImportError:
|
except ImportError:
|
||||||
# some platforms don't have multiprocessing
|
# some platforms don't have multiprocessing
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ Process #1..n:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import atexit
|
import atexit
|
||||||
from concurrent.futures import _base
|
from concurrent_py2.futures import _base
|
||||||
import Queue as queue
|
import Queue as queue
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
import threading
|
import threading
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"""Implements ThreadPoolExecutor."""
|
"""Implements ThreadPoolExecutor."""
|
||||||
|
|
||||||
import atexit
|
import atexit
|
||||||
from concurrent.futures import _base
|
from concurrent_py2.futures import _base
|
||||||
import itertools
|
import itertools
|
||||||
import Queue as queue
|
import Queue as queue
|
||||||
import threading
|
import threading
|
||||||
|
|||||||
Reference in New Issue
Block a user