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
Due to the fact that it is preferred to have callbacks called asynchronously, there is a delay between when a promise is resolved/rejected and when the callbacks are called. If during that delay .then is called, depending on the implementation, the newly added callbacks could very well be called twice: once by the delayed handler and once by the code that, in .then(), detects that the promise is already done.
A test to check against that would basically use .then(), .resolve() and .then() again, making sure that two callbacks are called only, in the proper order.
This is slightly pedandic, but I ran into that bug when implementing promises in my multitasker and other may have the same issue with this corner case. See https://github.com/JeanHuguesRobert/l8
The text was updated successfully, but these errors were encountered:
Due to the fact that it is preferred to have callbacks called asynchronously, there is a delay between when a promise is resolved/rejected and when the callbacks are called. If during that delay .then is called, depending on the implementation, the newly added callbacks could very well be called twice: once by the delayed handler and once by the code that, in .then(), detects that the promise is already done.
A test to check against that would basically use .then(), .resolve() and .then() again, making sure that two callbacks are called only, in the proper order.
This is slightly pedandic, but I ran into that bug when implementing promises in my multitasker and other may have the same issue with this corner case. See https://github.com/JeanHuguesRobert/l8
The text was updated successfully, but these errors were encountered: