RacingScope
A scope that allows racing multiple coroutine blocks against each other. The first block to complete successfully will provide the result, and all other blocks will be cancelled.
Parameters
The type of value that will be returned by the racing blocks.
Functions
Races a coroutine block against other blocks in the racing scope. If the block raises an error, it will be handled by handleError. If the block throws an exception, it will be handled by kotlinx.coroutines.CoroutineExceptionHandler. The block will be cancelled if another block completes first.
Races a coroutine block against other blocks in the racing scope. If the block throws an exception, it will be handled by CoroutineExceptionHandler. The block will be cancelled if another block completes first.
Races a coroutine block against other blocks in the racing scope. If the block throws an exception, it will be propagated and cancel the entire racing scope. The block will be cancelled if another block completes first.
Races a coroutine block against other blocks in the racing scope. If the block raises an error, it will be handled by handleError. The block will be cancelled if another block completes first.