我的意思是下面的代碼只是同步運行: someReceiveACallback('event', async () { const result = await imAsync() /*1*/ let anotherResult = null /*2*/ if (result.authenticated) anotherResult = await imAlsoAsync() /*3*/ send(anotherResult) /*4*/ })流只是:1-> 2-> 3-> 4,就好像是同步的一樣。如果默認行為是異步的,為什么將其標記為async確實使事情同步?
當異步實際上意味著同步運行時,這不是誤導嗎?
蠱毒傳說
2021-05-13 14:21:20