Reserve

class Reserve<out T>(scope: CoroutineScope, context: CoroutineContext, block: suspend () -> T)(source)

Deprecated

Use SuspendReserve

A class representing a coroutine-based reserve.

Parameters

T

the type of the result produced by the reserve

Constructors

Link copied to clipboard
constructor(scope: CoroutineScope, context: CoroutineContext, block: suspend () -> T)

Functions

Link copied to clipboard

Executes the given block asynchronously and returns a CompletableFuture that represents the result.

Link copied to clipboard
fun block(): T

Executes the given block of code in a no-scope blocking manner.