Reputation: 11450
To illustrate, the docs for the suspend function delay
says:
Delays coroutine for a given time without blocking a thread and resumes it after a specified time. This suspending function is cancellable. If the Job of the current coroutine is cancelled or completed while this suspending function is waiting, this function immediately resumes with CancellationException. There is a prompt cancellation guarantee. If the job was cancelled while this function was suspended, it will not resume successfully.
In this description, do waiting and suspended mean the same thing? Or is a suspend function that is waiting in a different type of state from when it's suspended?
Upvotes: 3
Views: 260
Reputation: 37650
There is no specific meaning for "waiting" in this case (to my knowledge), I would say it could definitely be read as "suspended". Both parts of this doc refer to the same state.
Upvotes: 3