Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
同期処理とはソースコードが書かれている順番に実行し、現在の処理が終わるまで次の処理は待機状態にある 対して、処理が書かれた順番には依存せず、異なるタイムライン上で実行することを非同期処理という サーバとの通信など時間のかかる処理を行う場合にはよく使われる 今回はEcmaScript6で標準化されたPromiseを使って非同期処理とはどのような処理か、どう実装すれば良いか紹介します。 EcmaScript6で実装された非同期処理のためのオブジェクト もともとはjqueryやasync.jsなどの方が先で、後から標準化されたらしい 仕様 初期化時の引数 resolve: 必須, 成功時に実行する関数 reject: 省略可能, 失敗時に実行する関数 以下の状態を返す pending: 未解決(初期値) fulfilled: 無事完了 rejected: 棄却 処理の結果によって状態が変わる r
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く