Expand description
Single-threaded asynchronous runtime infrastructure for ntex.
A System owns the runtime configuration and coordinates one or more
Arbiter execution threads. Each arbiter runs local futures on its own
thread, allowing tasks to use types that are not Send.
Use System::build() to configure a system, spawn() to start a local
task, and spawn_blocking() for blocking work.
Runtime backends are selected with Cargo features:
- no runtime feature uses the native ntex runtime
tokiouses the Tokio-based runtime adaptercompiouses the Compio-based runtime adapter
Re-exports§
pub use self::rt_default::*;
Modules§
Macros§
- syscall
- Helper macro to execute a system call
Structs§
- Arbiter
- An asynchronous execution environment running on one OS thread.
- Blocking
Error - Error returned when blocking work cannot produce a result.
- Blocking
Result - Future resolving to the result of blocking work.
- Builder
- Builder for an ntex runtime system.
- Id
- Identifier assigned to a running
System. - Ping
Record - Runtime
- The async runtime for ntex.
- Runtime
Builder - Builder for
Runtime. - System
- Runtime manager for a group of arbiter threads.
- System
Runner - A configured system that has not yet started its event loop.
- Thread
Pool - A thread pool for executing blocking operations.
Enums§
Traits§
Functions§
- get_
item - Returns a cloned value from the current arbiter’s thread-local storage.
- set_
item - Inserts a value into the current arbiter’s thread-local storage.
- spawn_
blocking - Submits blocking work and returns a future for its result.
- task_
callbacks ⚠ - Safety
- task_
opt_ ⚠callbacks - Safety
- with_
item - Provides access to a value in the current arbiter’s thread-local storage.