Closed z-hao-wang closed 5 years ago
this also fixes context issue when running in child processes. https://github.com/nodejs/node/issues/21481
This looks good to me, can it be merged in?
@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.
May be the sync functions need to be separate than the async functions so we don't loose the async functionality
@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?
@z-hao-wang Sounds good. If you can resolve the merge conflicts, i can pull in and test.
@oransel Just merged conflicts and test on my side worked.
see readme examples