Skip to main content

Crate deadpool_runtime

Crate deadpool_runtime 

Source
Expand description

§Deadpool runtime abstraction Latest Version Build Status Unsafe forbidden Rust 1.85+

Deadpool is a dead simple async pool for connections and objects of any type.

This crate provides a simple Runtime enum that can be used to target multiple runtimes. This crate avoids boxed futures and and only implements things actually needed by the deadpool crates.

Note: This crate is intended for making the development of deadpool-* crates easier. Other libraries and binary projects normally should not use this directly and use some provided reexports by the crates using it.

§Features

FeatureDescriptionExtra dependenciesDefault
tokio_1Enable support for tokio cratetokio/time, tokio/rtno
async-std_1Enable support for async-std crateasync-stdno
smol_2Enable support for smol cratedep:smol_2_async-io, smol_2_blocking, smol_2_futures-liteno

§License

Licensed under either of

at your option.

Enums§

Runtime
Enumeration for picking a runtime implementation.
SpawnBlockingError
Error of spawning a task on a thread where blocking is acceptable.

Functions§

spawn_blocking
Runs the given closure on a thread where blocking is acceptable.
spawn_blocking_background
Runs the given closure on a thread where blocking is acceptable.
timeout
Requires a Future to complete before the specified duration has elapsed.