Instance Method インスタンスメソッド

resume(throwing:)

Resume the task that’s awaiting the continuation by throwing the given error. 与えられたエラーをスローすることによって、継続を待っているタスクを再開します。

Declaration 宣言

func resume(throwing error: E)

Parameters パラメータ

error

The error to throw from the continuation. その継続からスローされたエラー。

Discussion 解説

A continuation must be resumed exactly once. If the continuation has already resumed, then calling this method results in undefined behavior. 継続は、厳密に一度だけ再開されなければなりません。継続が既に再開してしまっているならば、そのときこの関数を呼び出すことは未定義の挙動という結果になります。

After calling this method, control immediately returns to the caller. The task continues executing when its executor schedules it. このメソッドを呼び出した後、制御はすぐに呼び出し側に返ります。タスクは、それのエグゼキュータがそれを予定する場合は遂行を継続します。