0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

非同期処理と非同期通信の違い

Last updated at Posted at 2025-03-31

非同期処理と非同期通信の違いについて。

そもそも非同期とは

非同期とは、 連続する事象があった場合に、前の事象の完了を待たずに次の事象が実行される こと。

まだまだ抽象的ですが、これを踏まえて非同期処理と非同期通信についても見ていきましょう。

非同期処理とは

非同期処理とは、 ソースコード上の前の処理の完了を待たずに次の処理が実行される こと。

非同期通信とは

非同期通信とは、 通信が完了するのを待たずに、他のあらゆる処理(UI操作や新たなリクエストなど)を実行できる こと。

JavaScriptで非同期通信を実装する場合、fetchやXMLHttpRequest等のwebAPIを使う必要があります。fetchは非同期処理を行う関数(非同期関数)のため、非同期通信は、非同期処理を使って実装される。

参考資料

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?