You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: META.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,4 +22,8 @@ Even though we are not using a thenable, `Promise` is a more recognizable and ac
22
22
23
23
## Creation of Promises
24
24
25
-
Promise creation and managing is out of scope of this specification, as managing never shall cross library boundaries and thus does not need to be interoperable at all; each library shall resolve the Promise it created itself.
25
+
`Promise` creation and managing is out of scope of this specification, as managing never shall cross library boundaries and thus does not need to be interoperable at all. Each library shall resolve the `Promise` it created itself.
26
+
27
+
## Resolution of Promises
28
+
29
+
The specification defines that the value of a `Promise` must never be another `Promise`. Implementations may still accept to be resolved by a promise and then defer the resolution until the passed promise resolves.
Copy file name to clipboardExpand all lines: README.md
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ For further design explanations and notes, please refer to [the meta document](M
19
19
## Terminology
20
20
21
21
1._Promise_ is an object implementing `Interop\Async\Promise` and conforming to this specification.
22
-
2._Value_ is any legal PHP value (including `null`), except an instance of `Interop\Async\Promise`.
22
+
2._Value_ is any legal PHP value (including `null`), but not an instance of `Interop\Async\Promise`.
23
23
3._Error_ is any value that can be thrown using the `throw` statement.
24
24
4._Reason_ is an error indicating why a `Promise` has failed.
25
25
@@ -74,8 +74,6 @@ Any implementation MUST at least provide these two parameters. The implementatio
74
74
75
75
All registered callbacks MUST be executed in the order they were registered. If one of the callbacks throws an `Exception` or `Throwable`, it MUST be forwarded to `Async\Interop\Promise\ErrorHandler::notify`. The `Promise` implementation MUST then continue to call the remaining callbacks with the original parameters.
76
76
77
-
If a `Promise` is resolved with another `Promise`, the `Promise` MUST keep in pending state until the passed `Promise` is resolved. Thus, the value of a `Promise` can never be a `Promise`.
0 commit comments