moolib.Future

class moolib.Future

A future result.

Note

This class is a return value of an asynchronous call. It can not be instantiatied by the user.

Methods

cancel

Cancel the future calculation.

done

Check if the future has finished.

exception

Returns the exception that occurred, if any.

result

Block on the result of the Future.

cancel()

Cancel the future calculation.

done()

Check if the future has finished.

exception()

Returns the exception that occurred, if any.

result()

Block on the result of the Future.

Parameters

timeout (Optional[int]) – secs to wait for