struct FunctionSuspendTask
source · line 45public
public struct FunctionSuspendTask<T>(val task: suspend () -> T) : SuspendTask<T>
- Supertype
SuspendTask<T>
Adapts a suspending function value to the object-based coroutine task protocol.
function run
source · line 49public
public final override suspend fun run(): T
- Overrides
run· SuspendTask
Invokes the wrapped suspending function.
field task
source · line 45public
val task: suspend () -> T
type parameter T
source · line 45public
T
constructor constructor
source · line 45public
constructor(val task: suspend () -> T)
parameter task
source · line 45public
val task: suspend () -> T
function equals
source · line 45publiccompiler-derived
operator fun equals(other: FunctionSuspendTask<T>): Boolean
This derived operation is available when each field or payload type supports same-type equality. Required types: suspend () -> T.