view mercurial/thirdparty/concurrent/futures/__init__.py @ 37626:0a9c0d3480b2

futures: switch to absolute and relative imports This makes the package conform with our importing policy, silencing a number of warnings. It also makes the package usable when it isn't named "concurrent.futures." Differential Revision: https://phab.mercurial-scm.org/D3264
author Gregory Szorc <gregory.szorc@gmail.com>
date Mon, 09 Apr 2018 12:23:48 -0700
parents eb687c28a915
children
line wrap: on
line source

# Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Execute computations asynchronously using threads or processes."""

from __future__ import absolute_import

__author__ = 'Brian Quinlan (brian@sweetapp.com)'

from ._base import (
    FIRST_COMPLETED,
    FIRST_EXCEPTION,
    ALL_COMPLETED,
    CancelledError,
    TimeoutError,
    Future,
    Executor,
    wait,
    as_completed,
)
from .thread import ThreadPoolExecutor

try:
    from .process import ProcessPoolExecutor
except ImportError:
    # some platforms don't have multiprocessing
    pass