Note that the complete function returns
false when this deferred value is already complete or completing, while cancel returns
true as long as the deferred is still cancelling and the corresponding exception is incorporated into the final completion exception.
An instance of completable deferred can be created by
CompletableDeferred() function in active state.
All functions on this interface are thread-safe and can be safely invoked from concurrent coroutines without external synchronization.
CompletableDeferred interface is not stable for inheritance in 3rd party libraries, as new methods might be added to this interface in the future, but is stable for use.
Completes this deferred value with the value or exception in the given result. Returns
true if this deferred was completed as a result of this invocation and
false otherwise (if it was already completed).