Skip to content

Conversation

@StevenACoffman
Copy link

For #1 this removes the conditional, such that for waitTime of 0, setTimeout pushes the callback function to the end of the execution queue. If after setTimeout(callback, 0) you have blocking code which takes time to run, the callback will not be executed until the blocking code has finished.

This allows different requests with zero waitTime retries to yield to one another between attempts, and simplifies the code.

@flexdinesh
Copy link
Owner

@StevenACoffman Thanks for the PR. I don't see a difference this is gonna make. The purpose is to have the default behavior when the timeout is 0.

Can you please eloborate this a bit with cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants