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

Make HgUtils async #15

Open
victor-torres opened this issue Apr 19, 2016 · 6 comments
Open

Make HgUtils async #15

victor-torres opened this issue Apr 19, 2016 · 6 comments

Comments

@victor-torres
Copy link
Owner

spawnSync blocks NodeJS and we can't have another process/thread running it such as a web worker... We have to refactor HgUtils class to use spawn or exec, the asynchronous version of this command. Basically we need to encapsulate some methods into promises and consume them with .then() in HgRepositoryAsync class.

@victor-torres
Copy link
Owner Author

@mrstebo I further investigated based on your suggestions and I can confirm the blame is in the spawnSync guy.

@mrstebo
Copy link
Contributor

mrstebo commented Apr 19, 2016

I noticed it when I was doing a console.log when checking what hgCommand. Maybe we should have a separate HgUtilsAsync class that can just return promises?

@victor-torres
Copy link
Owner Author

Yup. Sounds good. Exactly what I would do.

@victor-torres
Copy link
Owner Author

@mrstebo are you up to this one? May I assign it to you?

@mrstebo
Copy link
Contributor

mrstebo commented May 12, 2016

I guess I could have a crack at it 😅

@mrstebo
Copy link
Contributor

mrstebo commented Sep 9, 2016

Yeah. They seemed to have removed the async stuff in Atom now...
There is an issue here.
And a discussion here

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

No branches or pull requests

2 participants