| 1 | cfg_macros! { |
| 2 | pub use crate::future::maybe_done::maybe_done; |
| 3 | |
| 4 | pub use std::future::poll_fn; |
| 5 | |
| 6 | #[doc (hidden)] |
| 7 | pub fn thread_rng_n(n: u32) -> u32 { |
| 8 | crate::runtime::context::thread_rng_n(n) |
| 9 | } |
| 10 | |
| 11 | cfg_coop! { |
| 12 | #[doc (hidden)] |
| 13 | #[inline ] |
| 14 | pub fn poll_budget_available(cx: &mut Context<'_>) -> Poll<()> { |
| 15 | crate::task::coop::poll_budget_available(cx) |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | cfg_not_coop! { |
| 20 | #[doc (hidden)] |
| 21 | #[inline ] |
| 22 | pub fn poll_budget_available(_: &mut Context<'_>) -> Poll<()> { |
| 23 | Poll::Ready(()) |
| 24 | } |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | pub use std::future::{Future, IntoFuture}; |
| 29 | pub use std::pin::Pin; |
| 30 | pub use std::task::{Context, Poll}; |
| 31 | |