From 593292d21a73a2e9410f880d27609bb4917a8b4c Mon Sep 17 00:00:00 2001 From: Turadg Aleahmad Date: Thu, 26 Sep 2024 08:57:53 -0700 Subject: [PATCH] fixup!: docs: Immediate, Prompt and Delayed promises Co-authored-by: Mathieu Hofman <86499+mhofman@users.noreply.github.com> --- packages/SwingSet/docs/async.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SwingSet/docs/async.md b/packages/SwingSet/docs/async.md index 27b45c6a2aa6..00ea8de87413 100644 --- a/packages/SwingSet/docs/async.md +++ b/packages/SwingSet/docs/async.md @@ -23,7 +23,7 @@ An **Immediate** promise is one that settles within the same Crank as its creati A **Prompt** promise settles without requiring further input from outside SwingSet. All Immediate promises are also Prompt, but not all Prompt promises are Immediate. -The SwingSet kernel processes run queue items until there is nothing left to run. Most hosts, like cosmic-swingset, do not inject new items before the queue is empty. In those cases the SwingSet kernel executes similarly to how a vat executes a crank: an external I/O triggers some execution, and the resulting queue items are drained before returning to the host for the next I/O. +The SwingSet kernel processes its run queue items until there is nothing left to run. Most hosts, like cosmic-swingset, do not inject new items on the SwingSet run queue until it's empty, and instead maintain their own queue of input events. In those cases the SwingSet kernel executes similarly to how a vat executes a crank: an external I/O event triggers some execution, and the resulting SwingSet run queue items are drained before returning to the host for the next I/O. While any of these queue items can technically cause a vat to upgrade, most systems running on SwingSet will trigger a vat upgrade based on some I/O input. As such, Prompt promises are unaffected by vat upgrades, unless the vat getting upgraded somehow got involved in processing the I/O that triggered its own upgrade. @@ -44,7 +44,7 @@ The following are examples of I/O that can prevent a promise from being Prompt ( ### Factors That Do Not Affect Promptness -- **Upgrade**: cosmic-swingset ensures quiescence between I/O and vat upgrades are triggered are triggered only when processing a new item from the chain's action queue (such as network input). +- **Upgrade**: cosmic-swingset ensures quiescence between I/O and vat upgrades are triggered only when processing a new item from the chain's action queue (such as network input). - **Bridge Calls**: Bridge calls are Prompt. While the caller may subsequently wait for an acknowledgment input (which is not Prompt), the bridge call itself does not affect promptness. ## Delayed Promises