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: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,14 @@ It returns a new `Promise` with the following resolution behavior:
50
50
* If the input `$promise` rejects before `$time` seconds, reject the resulting promise with its rejection value.
51
51
* If the input `$promise` does not settle before `$time` seconds, *cancel* the operation and reject the resulting promise with a [`TimeoutException`](#timeoutexception).
52
52
53
+
Internally, the given `$time` value will be used to start a timer that will
54
+
*cancel* the pending operation once it triggers.
55
+
This implies that if you pass a really small (or negative) value, it will still
56
+
start a timer and will thus trigger at the earliest possible time in the future.
57
+
58
+
If the input `$promise` is already settled, then the resulting promise will
59
+
resolve or reject immediately without starting a timer at all.
60
+
53
61
A common use case for handling only resolved values looks like this:
0 commit comments