javascript-tutorial / javascript-tutorial/en.javascript.info

await async

オープン
#3,567 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
HTML
スター
25.5k
フォーク
4k
PR マージ指標
30日以内にマージされた PR はありません

説明

In https://javascript.info/async-await it states

Let’s emphasize: await literally suspends the function execution until the promise settles, and then resumes it with the promise result. That doesn’t cost any CPU resources, because the JavaScript engine can do other jobs in the meantime: execute other scripts, handle events, etc.

This is not clear enough. It must clarify that it just suspends the async function in which the await resides. It doesn't suspend the outer method if that doesn't await.

Therefore note that in this example "start 1" and "start 2" are logged before the resolution is logged.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

javascript.info/async-await の async/await に関する記事から始め、await による中断を説明しているセクションを確認してください。中断されるのはそれを含む async 関数だけであることを明確にし、その後、リンク先の例で観測されるログの順序を取り入れてください。説明が async 関数とその外側の呼び出し元を正確に区別できていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
javascript
領域
documentation
issue の種類
ドキュメント
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。