Executor that uses a green thread pool to execute calls asynchronously.
See: https://docs.python.org/dev/library/concurrent.futures.html and http://eventlet.net/doc/modules/greenpool.html for information on how this works.
It gathers statistics about the submissions executed for post-analysis...
Initializes a green thread pool executor.
Parameters: |
|
---|
Accessor to determine if the executor is alive/active.
ExecutorStatistics about the executors executions.
Submit some work to be executed (and gather statistics).
Parameters: |
|
---|
Executor that uses a process pool to execute calls asynchronously.
It gathers statistics about the submissions executed for post-analysis...
See: https://docs.python.org/dev/library/concurrent.futures.html
Accessor to determine if the executor is alive/active.
ExecutorStatistics about the executors executions.
Submit some work to be executed (and gather statistics).
Executor that uses the caller to execute calls synchronously.
This provides an interface to a caller that looks like an executor but will execute the calls inside the caller thread instead of executing it in a external process/thread for when this type of functionality is useful to provide...
It gathers statistics about the submissions executed for post-analysis...
Synchronous executor constructor.
Parameters: |
|
---|
Accessor to determine if the executor is alive/active.
Restarts this executor (iff previously shutoff/shutdown).
NOTE(harlowja): clears any previously gathered statistics.
ExecutorStatistics about the executors executions.
Submit some work to be executed (and gather statistics).
Executor that uses a thread pool to execute calls asynchronously.
It gathers statistics about the submissions executed for post-analysis...
See: https://docs.python.org/dev/library/concurrent.futures.html
Initializes a thread pool executor.
Parameters: |
|
---|
Accessor to determine if the executor is alive/active.
ExecutorStatistics about the executors executions.
Submit some work to be executed (and gather statistics).
Represents the result of an asynchronous computation.
Attaches a callable that will be called when the future finishes.
Cancel the future if possible.
Returns True if the future was cancelled, False otherwise. A future cannot be cancelled if it is running or has already completed.
Return True if the future has cancelled.
Return True of the future was cancelled or finished executing.
Return the exception raised by the call that the future represents.
CancelledError: If the future was cancelled. TimeoutError: If the future didn’t finish executing before the given
timeout.
Return a tuple of (exception, traceback) raised by the call that the future represents.
CancelledError: If the future was cancelled. TimeoutError: If the future didn’t finish executing before the given
timeout.
Return the result of the call that the future represents.
CancelledError: If the future was cancelled. TimeoutError: If the future didn’t finish executing before the given
timeout.
Exception: If the call raised then that exception will be raised.
Return True if the future is currently executing.
Sets the result of the future as being the given exception.
Should only be used by Executor implementations and unit tests.
Sets the result of the future as being the given exception and traceback.
Should only be used by Executor implementations and unit tests.
Sets the return value of work associated with the future.
Should only be used by Executor implementations and unit tests.
Mark the future as running or process any cancel notifications.
Should only be used by Executor implementations and unit tests.
If the future has been cancelled (cancel() was called and returned True) then any threads waiting on the future completing (though calls to as_completed() or wait()) are notified and False is returned.
If the future was not cancelled then it is put in the running state (future calls to running() will return True) and True is returned.
This method should be called by Executor implementations before executing the work associated with this future. If this method returns False then the work should not be executed.
Represents the result of an asynchronous computation.
Holds immutable information about a executors executions.
The average runtime of all submissions executed.
Returns: | average runtime of all submissions executed |
---|---|
Return type: | number |
Raises : | ZeroDivisionError when no executions have occurred. |
How many submissions were cancelled before executing.
Returns: | how many submissions were cancelled before executing |
---|---|
Return type: | number |
How many submissions were executed (failed or not).
Returns: | how many submissions were executed |
---|---|
Return type: | number |
How many submissions ended up raising exceptions.
Returns: | how many submissions ended up raising exceptions |
---|---|
Return type: | number |
Total runtime of all submissions executed (failed or not).
Returns: | total runtime of all submissions executed |
---|---|
Return type: | number |
Exception raised when a submitted call is rejected (for some reason).
Wait for one (any) of the futures to complete.
Works correctly with both green and non-green futures (but not both together, since this can’t be guaranteed to avoid dead-lock due to how the waiting implementations are different when green threads are being used).
Returns pair (done futures, not done futures).
Wait for all of the futures to complete.
Works correctly with both green and non-green futures (but not both together, since this can’t be guaranteed to avoid dead-lock due to how the waiting implementations are different when green threads are being used).
Returns pair (done futures, not done futures).
Named tuple returned from wait_for* calls.