Registry / async / tokio-current-thread

tokio-current-thread

JSON →
library0.1.7rscratesunverified

Single threaded executor which manages many tasks concurrently on the current thread.

# Cargo.toml [dependencies] tokio-current-thread = "0.1.7"
INSTALL
IMPORT
SIG · TOKIO-CURRENT-THRE
T
tokio-current-thread
asyncrustv0.1.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CurrentThread
use tokio_current_thread::CurrentThread;

Runs a single-threaded Tokio executor on the current thread.

use tokio_current_thread::CurrentThread; fn main() { let mut executor = CurrentThread::new(); executor.spawn(async { println!("Hello from current thread executor"); }); executor.run().unwrap(); }
Debug
Known issues
breakingDeprecated in favor of tokio::runtime::current_thread (now part of tokio crate).
fix
Use `tokio::runtime::Runtime::new_current_thread()` instead.
affects: >=0.2.0
Upgrade
Version history
0.1.7latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
28
Resources
tokio-current-thread — cargo add tokio-current-thread · libregistry