invoke On First
Awaits the first Deferred to complete and invokes the callback on its value. Other deferred values are cancelled if cancelOnResult is true.
Return
The result of applying the callback to the first completed value
Parameters
The CoroutineScope in which to await the deferred values
If true, cancels all other deferred values after the first completes. Defaults to true
The suspending function to apply to the first completed value
Type Parameters
The type of the deferred values
The type of the result after applying the callback
Awaits the first Deferred from the given variants to complete and invokes the callback on its value. Other deferred values are cancelled if cancelOnResult is true.
Return
The result of applying the callback to the first completed value
Parameters
The CoroutineScope in which to await the deferred values
The deferred values to race
If true, cancels all other deferred values after the first completes. Defaults to true
The suspending function to apply to the first completed value
Type Parameters
The type of the deferred values
The type of the result after applying the callback