Skip to content

Commit

Permalink
docs: added documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSunnyMonster committed Dec 14, 2024
1 parent 1b19b65 commit 9e2a582
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,13 @@ impl<T: futures_io::AsyncSeek> tokio::io::AsyncSeek for Compat<T> {
}
}

/// Manually enter the tokio runtime.
///
/// This function returns the [`EnterGuard`] which keeps the tokio runtime active until it is
/// dropped. Use this function when you cannot use one of the preexisting wrappers this crate
/// provides.
///
/// TODO: Examples
pub fn enter_tokio_runtime() -> EnterGuard<'static> {
TOKIO1.handle.enter()
}
Expand Down

0 comments on commit 9e2a582

Please sign in to comment.