Skip to content

Commit 687132f

Browse files
committedNov 27, 2024
Clarify docs on Simulation::from_async_fn
Signed-off-by: Denis Varlakov <denis@dfns.co>
1 parent 1d12c78 commit 687132f

File tree

1 file changed

+4
-0
lines changed
  • round-based/src/simulation

1 file changed

+4
-0
lines changed
 

‎round-based/src/simulation/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ where
235235
/// Constructs a simulation with `n` parties from async function that defines the protocol
236236
///
237237
/// Each party has index `0 <= i < n` and instantiated via provided `init` function
238+
///
239+
/// Async function will be converted into a [state machine](crate::state_machine). Because of that,
240+
/// it cannot await on any futures that aren't provided by `MpcParty` (that is given as an argument
241+
/// to this function).
238242
pub fn from_async_fn<F>(
239243
n: u16,
240244
mut init: impl FnMut(u16, crate::state_machine::MpcParty<M>) -> F,

0 commit comments

Comments
 (0)