Skip to main content

Crate spargio

Crate spargio 

Source
Expand description

Sharded async runtime API centered around msg_ring-style signaling.

Modules§

boundary
Async boundary channel for passing request/response work across runtime boundaries.

Structs§

CancellationFuture
Future returned by CancellationToken::cancelled.
CancellationToken
Cooperative cancellation token shared between tasks.
Interval
Repeating timer that yields scheduled tick instants.
JoinHandle
Future returned by runtime spawn APIs.
LocalJoinHandle
Future returned by shard-local spawn APIs.
NextEvent
Future that yields the next event from a shard event queue.
NextHotCount
Future that yields the next coalesced hot-counter value for a tag.
RemoteShard
Handle to a specific target shard for message sending.
Runtime
Owned runtime instance.
RuntimeBuilder
Builder for constructing a Runtime.
RuntimeHandle
Cheap, clonable runtime control handle.
RuntimeStats
Runtime statistics snapshot.
SendTicket
Completion ticket for send/flush operations.
ShardCtx
Shard-local execution context available on worker threads.
Sleep
A resettable sleep future.
TaskGroup
Group helper that couples task spawning with a shared cancellation token.
TaskGroupJoinHandle
Join handle returned by TaskGroup::spawn_with_placement.
TimeoutError
Error returned by timeout helpers when the deadline expires.

Enums§

BackendKind
Runtime backend selection.
Event
Runtime event stream item.
IdleStrategy
Worker idle strategy used when a shard has no immediately runnable work.
JoinError
Join handle completion failure.
MissedTickBehavior
Policy used by Interval when ticks are missed.
RuntimeError
Runtime construction/spawn/control error.
SendError
Message send failure.
StealableQueueBackend
Internal queue backend used for stealable task inboxes.
TaskPlacement
Task placement policy used when spawning.

Traits§

RingMsg
Trait for strongly-typed cross-shard message encoding/decoding.

Functions§

interval
Creates an interval that starts immediately.
interval_at
Creates an interval starting at start.
run
Runs a top-level async job on a freshly constructed runtime using default builder settings.
run_local_on
Runs a top-level local (!Send) async job on a specific shard.
run_with
Runs a top-level async job on a freshly constructed runtime built from builder.
sleep
Asynchronously sleeps for at least duration.
sleep_until
Asynchronously sleeps until deadline.
timeout
Runs fut and returns an error if it does not complete within duration.
timeout_at
Runs fut and returns an error if it does not complete by deadline.

Type Aliases§

ShardId
Runtime shard identifier.