RuntimeExecutionOwner

Serial ownership for a runtime whose scheduler may move work between physical threads. Adapters must validate native ownership before entering; this scope grants no platform permissions. Create state and sessions inside run, and enter the same owner for every subsequent operation and cleanup. Concurrent entry fails before executing user code. Nested entry restores the caller's context on every exit. Ordinary callers outside a scope retain their existing construction-thread confinement.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Ownership captured by guards in the API, retained core, and transport adapters.

Functions

Link copied to clipboard
fun <T> run(operation: () -> T): T

Executes synchronous work exclusively under this owner, releasing the scope even when it throws. The scope never propagates into asynchronous tasks; their scheduler must explicitly reenter it.