# DoWithFirstBuilder

class DoWithFirstBuilder < T >(scope: CoroutineScope)(source)

A builder for creating multiple deferred computations that can be executed, with only the first completing one being used. This is useful for race conditions where you want the result of whichever computation finishes first.

#### Parameters

scope

The CoroutineScope in which to create the deferred computations

#### Type Parameters

T

The type of values produced by the deferred computations

## Constructors

DoWithFirstBuilder
Link copied to clipboard
constructor(scope: CoroutineScope)

## Functions

add
Link copied to clipboard
fun add (block: suspend CoroutineScope.() -> T )
build
Link copied to clipboard
fun build (): List <Deferred< T >>
include
Link copied to clipboard
fun include (block: suspend CoroutineScope.() -> T )
plus
Link copied to clipboard
operator fun plus (block: suspend CoroutineScope.() -> T )