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

resume(returning:)

Resume the task that’s awaiting the continuation by returning the given value. 与えられた値を返すことによって、継続を待っているタスクを再開します。

Declaration 宣言

func resume(returning value: T) where E == Never

Parameters パラメータ

value

The value to return 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. このメソッドを呼び出した後、制御はすぐに呼び出し側に返ります。タスクは、それのエグゼキュータがそれを予定する場合は遂行を継続します。