copyAsWaiting method

AsyncWaiting<T> copyAsWaiting()

A method that creates an AsyncWaiting object based on the phase that this method is called on.

The phase is converted to a new AsyncWaiting object with the same data as that of the original phase, and the object is returned. This is handy for switching the phase to AsyncWaiting without losing the previous data.


AsyncWaiting<T> copyAsWaiting() {
  return AsyncWaiting(data);