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

resume(returning:)

Resume the task awaiting the continuation by having it return normally from its suspension point. 継続を待っているタスクを、それにそれの中断地点から通常に復帰させることによって再開します。

Declaration 宣言

func resume(returning value: T)

Parameters パラメータ

value

The value to return from the continuation. その継続から返す値。

Discussion 解説

A continuation must be resumed exactly once. If the continuation has already been resumed through this object, then the attempt to resume the continuation will trap. 継続は、厳密に一度だけ再開されなければなりません。継続が既にこのオブジェクトを通して再開されてしまったならば、そのとき継続を再開する試みはトラップするでしょう。

After resume enqueues the task, control immediately returns to the caller. The task continues executing when its executor is able to reschedule it. resumeがタスクを待ち行列に入れた後、制御はすぐに呼び出し側へと返ります。タスクは、それの遂行者(executor)がそれを予定変更可能である時に遂行を継続します。