Skip to content

Commit

Permalink
Update doc/md/writing-motoko/async-star.md
Browse files Browse the repository at this point in the history
  • Loading branch information
crusso authored Aug 15, 2024
1 parent 157adef commit 9dbb862
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/md/writing-motoko/async-star.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ await* computation;

:::danger

You should use `async*`/`await*` star with care. An ordinary `await` is a commit point in Motoko: all your state changes will be committed at the `await` before suspension.
You should use `async*`/`await*` with care. An ordinary `await` is a commit point in Motoko: all your state changes will be committed at the `await` before suspension.
An `await*`, on the other hand, is not a commit point (since its body may not await at all, or commit at some indefinite point).
This means that traps within the awaited computation may roll back the state of the actor to the last commit point *before* the `await*`, not to the state at the `await*` itself.

Expand Down

0 comments on commit 9dbb862

Please sign in to comment.