From 9dbb862d932fbd4c669acb8a159f9dc7a354a4dc Mon Sep 17 00:00:00 2001 From: Claudio Russo Date: Thu, 15 Aug 2024 21:20:54 +0100 Subject: [PATCH] Update doc/md/writing-motoko/async-star.md --- doc/md/writing-motoko/async-star.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/md/writing-motoko/async-star.md b/doc/md/writing-motoko/async-star.md index 7fb8f52a2af..4a22295552d 100644 --- a/doc/md/writing-motoko/async-star.md +++ b/doc/md/writing-motoko/async-star.md @@ -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.