Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zalgo bugs #26

Closed
mikolalysenko opened this issue Apr 25, 2015 · 1 comment

Comments

@mikolalysenko
Copy link

commented Apr 25, 2015

I'm trying to benchmark easystarjs for an experiment, but keep running into Zalgo bugs due to easystar.js not implementing asynchronous calls correctly.

For example, in some executions of easystar it is possible for the callback to be called synchronously (!!!). See the following line for reference:

https://github.com/prettymuchbryce/easystarjs/blob/master/src/easystar.js#L149-L152

This can cause terrible problems if you aren't expecting the callback to execute until all calls to easystar have been dispatched. A simple fix would be to wrap these calls in a setTimeout, for example.

@prettymuchbryce

This comment has been minimized.

Copy link
Owner

commented Apr 25, 2015

Hi Mikola. Thanks for bringing this issue to my attention. I agree that the callbacks should always be asynchronous. I will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.