Expand description
Runtime APIs for running tasks on the current thread.
Modules§
- channel
- A one-shot, futures-aware channel.
- connect
- DNS-aware TCP connector service.
- metrics
- Runtime, arbiter, and blocking thread pool metrics.
- polling
- rt
- Native single-threaded runtime, task spawning, handles, and clock access.
- signals
- Process-signal subscriptions and optional application-panic notifications.
- time
- Hierarchical timer wheel backing ntex timers.
- tokio
- uring
Macros§
- syscall
- Executes a Unix system call and converts a
-1result to the last I/O error.
Structs§
- Abort
OnUnwind - Aborts the process when dropped, logging the message first.
- 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.
- Default
Runtime - The default runtime.
- Handle
- A thread-safe handle for submitting work to a Tokio-backed arbiter.
- Id
- Identifier assigned to a
SystemorArbiter. - Join
Error - Error returned when a Tokio-backed task ends without an output.
- Join
Handle - A local task handle. It is neither
SendnorSync. - Listener
- TCP listener that accepts connections through the current reactor.
- Local
Waker - An owned wake handle that can only be used on the thread that acquired it.
- Remote
Join Handle - A task handle returned by
Handle::spawn(). - Runtime
- The native single-threaded task scheduler.
- Runtime
Builder - Builder for
Runtime. - Sendable
Join Handle - A sendable task handle returned by
spawn_sendable(). - System
- Runtime manager for a group of arbiter threads.
- System
Runner - A configured system that has not yet started its event loop.
- Task
Callbacks - Callbacks for instrumenting spawned tasks.
- Thread
Pool - A thread pool for executing blocking operations.
Enums§
- Driver
Type - Operating-system I/O mechanism used by a driver.
- Poll
Result - Outcome of one call to
Runtime::poll.
Traits§
- Driver
- Drives I/O events and scheduled tasks for the native
Runtime. - Notify
- Wakes a runtime driver, retaining the wakeup if it has not blocked yet.
- Reactor
- Runtime reactor used for network connection and transport operations.
- Runner
- Creates and drives an event loop for a system or arbiter thread.
Functions§
- from_
tcp_ stream - Converts a standard-library TCP stream into an
Iovalue. - from_
unix_ stream - Converts a standard-library Unix stream into an
Iovalue. - get_
item - Returns a cloned value from the current arbiter’s thread-local storage.
- is_
tcp_ listener_ supported - Returns
trueif the current reactor supportstcp_listener. - now
- Returns the current time.
- set_
item - Inserts a value into the current arbiter’s thread-local storage.
- spawn
- Spawns a future on the current Tokio local task set and returns its join handle.
- spawn_
blocking - Submits blocking work and returns a future for its result.
- spawn_
detached - Spawns a future on the current thread without a join handle.
- spawn_
sendable - Spawns a local future and returns a
SendableJoinHandlefor its result. - tcp_
connect - Opens a TCP connection to a remote host.
- tcp_
listener - Registers a TCP listener with the current reactor.
- unix_
connect - Opens a Unix domain socket connection.
- with_
item - Provides access to a value in the current arbiter’s thread-local storage.
- with_
reactor - Sets the current reactor and runs the provided closure.
Type Aliases§
- Block
Future - A boxed, pinned future passed to a
Runner.