As for Promises / A + Specification, is it a promise that has ever allowed you to never allow or reject?

In the Promises / A + standard, I wonder if I need to promise to ultimately allow or decline. By this I mean the promise of X with the property that under no circumstances will X be allowed or rejected.

Promises / A + claims

  • Pending promise:

    I am. can go into either completed or rejected state.

This may be the part that also makes me odd. I don’t know whether to read it as “He may pass, but may not be,” or that he will eventually pass, and he may proceed to fulfillment or rejection.

+1
source share
1 answer

No, the specification does not provide for this. There is no restriction on how long a promise should be for a settlement. And this includes an endless long time, known as a promise, never resolving / never settling, or forever awaiting a promise. (see also promise terminology )
This term may be used intentionally here and carry a conditional meaning .

There are even promising implementations that offer a primitive Promise.never(for example, in creed ) to optimize memory consumption for the case when you know that your promise will not be fulfilled.

+1
source

Source: https://habr.com/ru/post/1677365/


All Articles