From 799480464837b4f7f144a17019f4ec4ff3d94a4c Mon Sep 17 00:00:00 2001 From: PPPDUD <107440101+PPPDUD@users.noreply.github.com> Date: Mon, 27 May 2024 19:15:53 -0400 Subject: [PATCH] Revise sentence regarding async Current sentence is confusing, so I fixed it. --- docs/development/extensions/async.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/extensions/async.md b/docs/development/extensions/async.md index 3fdd953f..bd2aa8c1 100644 --- a/docs/development/extensions/async.md +++ b/docs/development/extensions/async.md @@ -6,7 +6,7 @@ hide_table_of_contents: true import {ExtensionCode} from './utils.js'; -Sometimes you will want your extension to wait for an "asynchronous" or "async" operation to complete before resuming instead of for your block to complete (almost) immediately. A common example of this is making a request: no matter how fast your internet is, any network request is not going to be instant. +Sometimes you will want your extension to wait for an "asynchronous" or "async" operation to complete before resuming execution (versus resuming execution early and potentially causing problems). A common example of this is making a request: no matter how fast your internet is, any network request is not going to be instant. Modern JavaScript has a cool utility for dealing with these: [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). These are how your block can inform Scratch that your block is waiting for an async operation to complete, and the eventual value.