view mercurial/thirdparty/concurrent/futures/__init__.py @ 42530:dc3fdd1b5af4

state: created new class statecheck to handle unfinishedstates For the purpose of handling states for various multistep operations like `hg graft`, `hg histedit`, `hg bisect` et al a new class called statecheck is created .This will help in having a unified approach towards these commands and handle them with ease. The class takes in 4 basic arguments which include the name of the command, the name of the state file associated with it , clearable flag , allowcommit flag. This also also adds the support of`checkunfinished()` and `clearunfinished()` to the class. Tests remain unchanged. Differential Revision: https://phab.mercurial-scm.org/D6501
author Taapas Agrawal <taapas2897@gmail.com>
date Sun, 09 Jun 2019 00:43:36 +0530
parents 0a9c0d3480b2
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