Skip to content

future_processor

synFutureProcessor

synFutureProcessor()

A class that uses a dedicated thread to process results from concurrent Futures.

Usage

processor = FutureResultProcessor() result = processor.process_future_result(future)

on_done

on_done(id, future: Future) -> None

Callback to be called when the Future is done.

get_future_result

get_future_result(future: Future) -> Any

Blocks until the result of the given Future is ready, even if called from an event loop thread.

Parameters:

Name Type Description Default
future Future

A concurrent.futures.Future object.

required

Returns:

Type Description
Any

The result of the future, or raises its exception.