close
Releases the engine. The release runs on the engine's thread, after any call still running there, so it can happen after this returns. A thread made for the engine then ends.
An await still waiting ends with IllegalStateException, and a promise handed out by deferredToPromise or suspendFunction is no longer settled. The work behind such a promise belongs to the scope it was given and carries on.