Registry / async / pollster

pollster

JSON →
library0.4.0rscratesunverified

Synchronously block the thread until a future completes

# Cargo.toml [dependencies] pollster = "0.4.0"
INSTALL
IMPORT
SIG · POLLSTER
P
pollster
asyncrustv0.4.0
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.

block_on
use pollster::block_on;

Blocks the current thread until the async future completes.

use pollster::block_on; async fn hello() -> String { "Hello, world!".to_string() } fn main() { let result = block_on(hello()); println!("{}", result); }
Debug
Known issues
gotchaBlocking the thread can cause deadlocks if used inside an async context.
fix
Avoid using block_on inside async functions; use .await instead.
affects: >=0.0.0
Upgrade
Version history
0.4.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
20
Resources