javascript-tutorial / javascript-tutorial/en.javascript.info
await async
未關閉
還沒有人認領這個 Issue。
- 主要語言
- 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.
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 javascript.info/async-await 上的 async/await 文章開始,查看說明 await 暫停的章節。明確指出只有包含它的 async 函式會被暫停,接著納入連結範例中觀察到的記錄順序。當說明能準確區分 async 函式與其外部呼叫者時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- javascript
- 領域
- documentation
- Issue 類型
- 文件
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100