git-diff icon indicating copy to clipboard operation
git-diff copied to clipboard

Async function not really async

Open mk-pmb opened this issue 4 years ago • 1 comments

As long as the sync function is really sync, i.e. no other node.js code can run while it's waiting for the data, then there's no way to make it async. The current implementation does provide callback compatibility, but naming it "async" looks like a big lie.

Thanks to @joepie91 for pointing out this bug on IRC.

mk-pmb avatar Aug 12 '19 20:08 mk-pmb

Anyone wanna raise a PR for this? I am busy ATM - If anyone has time, unit tests must continue to pass with 100% coverage (unless a valid reason is given why coverage is not 100% and the relevant block should be commented out with istanbul ignore - happy to add contributors as npm contributors also so they can publish)

danday74 avatar Aug 19 '19 09:08 danday74