Skip to content

Commit

Permalink
doc(runtime): add clear docs about the sending behavior of OpFuture
Browse files Browse the repository at this point in the history
  • Loading branch information
Berrysoft committed Nov 28, 2024
1 parent befb6ad commit b382495
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions compio-runtime/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ pub fn spawn_blocking<T: Send + 'static>(

/// Submit an operation to the current runtime, and return a future for it.
///
/// It is safe but unspecified behavior to send the returned future to another
/// runtime and poll it.
///
/// ## Panics
///
/// This method doesn't create runtime. It tries to obtain the current runtime
Expand All @@ -517,6 +520,9 @@ pub fn submit<T: OpCode + 'static>(op: T) -> impl Future<Output = BufResult<usiz
/// Submit an operation to the current runtime, and return a future for it with
/// flags.
///
/// It is safe but unspecified behavior to send the returned future to another
/// runtime and poll it.
///
/// ## Panics
///
/// This method doesn't create runtime. It tries to obtain the current runtime
Expand Down

0 comments on commit b382495

Please sign in to comment.