Remix.run Logo
▲ emadda 2 years ago

That's a nice mental model for promises.

But it is not always true that one promise instance can be awaited in multiple places.

In Swift you cannot get the ref to the Promise instance, so you cannot store it or await it at multiple places.

Once you start an async fn the compiler forces you to await it where it was started (you can use `await task.value`, but that is a getter fn that creates a new hidden promise ref on every call).