Module runtime

Module runtime 

Source
Expand description

Luminal Runtime Core Implementation

This module provides the core components of the Luminal async runtime, designed as a DLL-boundary safe alternative to tokio with similar performance characteristics and API compatibility.

§Key Components

  • Runtime: Main runtime for executing async tasks
  • Handle: Lightweight handle to a Runtime
  • JoinHandle: Handle for awaiting the completion of async tasks
  • Executor: Core task execution engine
  • Task: Individual async task representation

§Module Structure

The runtime is organized into several submodules:

  • error: Error types specific to task execution
  • executor: Core execution engine implementation
  • handle: Runtime handle implementation
  • join_handle: Join handle implementation
  • runtime: Main runtime implementation
  • task: Task representation
  • worker: Worker thread implementation
  • waker: Custom waker implementation

Structs§

Executor
Core task execution engine for the Luminal runtime
Handle
A lightweight handle to a Runtime
JoinHandle
Handle for awaiting the completion of an asynchronous task
Runtime
Main runtime for executing async tasks
TaskId
A unique identifier for tasks within the runtime

Enums§

TaskError
Errors that can occur when working with tasks in the runtime

Functions§

block_on
Blocks the current thread until the provided future completes
spawn
Spawns a future onto the current thread’s runtime