Comcast / sirius

A distributed system library for managing application reference data
http://comcast.github.io/sirius/
Apache License 2.0
298 stars 49 forks source link

Enable registering callback when future completes #132

Closed HaloFour closed 5 years ago

HaloFour commented 6 years ago

Adds a SiriusFuture[T] interface which adds addListener methods allowing a consumer to register a Runnable callback for when the underlying Akka Future[T] completes. This would enable basic asynchronous composition without having to block the current thread or poll the Future[T] for completion.

This could be a breaking change for any consumer that directly implements the Sirius interface as the return value has been changed from Future[T] to SiriusFuture[T], but consumers of the interface should be fine as SiriusFuture[T] extends Future[T].

CLAassistant commented 6 years ago

CLA assistant check
All committers have signed the CLA.