Skip to content

Commit

Permalink
Add some documentation on why/when async_cx can return None.
Browse files Browse the repository at this point in the history
  • Loading branch information
acw committed Mar 7, 2022
1 parent 382567f commit 09d62a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/wasmtime/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,10 @@ impl StoreOpaque {
panic!("trampoline missing")
}

/// Yields the async context, assuming that we are executing on a fiber and
/// that fiber is not in the process of dying. This function will return
/// None in the latter case (the fiber is dying), and panic if
/// `async_support()` is false.
#[cfg(feature = "async")]
#[inline]
pub fn async_cx(&self) -> Option<AsyncCx> {
Expand Down

0 comments on commit 09d62a4

Please sign in to comment.