| Crates.io | yield-now |
| lib.rs | yield-now |
| version | 0.1.0 |
| created_at | 2024-08-11 11:08:26.144769+00 |
| updated_at | 2024-08-11 11:08:26.144769+00 |
| description | Wakes current task and returns Poll::Pending once |
| homepage | https://github.com/uskrai/yield-now |
| repository | https://github.com/uskrai/yield-now.git |
| max_upload_size | |
| id | 1333204 |
| size | 5,285 |
Wakes current task and returns [Poll::Pending] once
This function can be used when we want to give task scheduler time to pause before doing some long running task.
this function will use runtime yield_now depending on which feature is enabled
see [tokio::task::yield_now] for tokio
see [async_std::task::yield_now] for async-std
see [futures_lite::future::yield_now] for futures-lite
use yield_now::yield_now;
yield_now().await;
License: MIT