Skip to main content

Module rt

Module rt 

Source
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 -1 result to the last I/O error.

Structs§

AbortOnUnwind
Aborts the process when dropped, logging the message first.
Arbiter
An asynchronous execution environment running on one OS thread.
BlockingError
Error returned when blocking work cannot produce a result.
BlockingResult
Future resolving to the result of blocking work.
Builder
Builder for an ntex runtime system.
DefaultRuntime
The default runtime.
Handle
A thread-safe handle for submitting work to a Tokio-backed arbiter.
Id
Identifier assigned to a System or Arbiter.
JoinError
Error returned when a Tokio-backed task ends without an output.
JoinHandle
A local task handle. It is neither Send nor Sync.
Listener
TCP listener that accepts connections through the current reactor.
LocalWaker
An owned wake handle that can only be used on the thread that acquired it.
RemoteJoinHandle
A task handle returned by Handle::spawn().
Runtime
The native single-threaded task scheduler.
RuntimeBuilder
Builder for Runtime.
SendableJoinHandle
A sendable task handle returned by spawn_sendable().
System
Runtime manager for a group of arbiter threads.
SystemRunner
A configured system that has not yet started its event loop.
TaskCallbacks
Callbacks for instrumenting spawned tasks.
ThreadPool
A thread pool for executing blocking operations.

Enums§

DriverType
Operating-system I/O mechanism used by a driver.
PollResult
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 Io value.
from_unix_stream
Converts a standard-library Unix stream into an Io value.
get_item
Returns a cloned value from the current arbiter’s thread-local storage.
is_tcp_listener_supported
Returns true if the current reactor supports tcp_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 SendableJoinHandle for 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§

BlockFuture
A boxed, pinned future passed to a Runner.