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

supporting synchronized call and fix running in child thread #75

Merged
merged 11 commits into from
Jun 6, 2019

Conversation

z-hao-wang
Copy link
Contributor

see readme examples

@z-hao-wang
Copy link
Contributor Author

this also fixes context issue when running in child processes.
nodejs/node#21481

@danielsokolowski
Copy link

This looks good to me, can it be merged in?

@z-hao-wang
Copy link
Contributor Author

@danielsokolowski the example are in the readme, you can avoid using a callback.
The original purpose is that I have to work with a different lib that doesn't support callback type calls.
Also this enables to run in forked child thread.

@oransel
Copy link
Owner

oransel commented May 29, 2019

May be the sync functions need to be separate than the async functions so we don't loose the async functionality

@z-hao-wang
Copy link
Contributor Author

@oransel I believe this change is fully backward compatible, it will use async method if you pass in a callback, otherwise it will do sync call. how else could we separate the sync methods?

@oransel
Copy link
Owner

oransel commented May 29, 2019

@z-hao-wang Sounds good. If you can resolve the merge conflicts, i can pull in and test.

@z-hao-wang z-hao-wang changed the title supporting synchronized call supporting synchronized call and fix running in child thread May 29, 2019
@z-hao-wang
Copy link
Contributor Author

@oransel Just merged conflicts and test on my side worked.

@oransel oransel merged commit 6992a92 into oransel:master Jun 6, 2019
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.

3 participants