|
|
|
|
|
by lelanthran
1086 days ago
|
|
> Uh-huh, but did the message actually get through? Can they safely just retry? ... > The use of promises and await indicates a possibility of failure semantics that would otherwise not be apparent in the program's control-flow. They don't, though. They don't indicate if the message got through. They don't indicate if you can safely retry. Their failure mode is exactly as opaque or as transparent as synchronous calls. The reason for their existence and mandatory use in Javascript is due to a deficiency of the platform (single thread, so all synchronous calls block). If the platform was better they would never have existed. |
|
The promise is at the remote end. Promise resolution is idempotent, so retries always resolve to the same value. These are correct promise semantics as pioneered in the E language.