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

Misleading readme example #8

Open
dansgithubuser opened this issue Jul 20, 2018 · 1 comment
Open

Misleading readme example #8

dansgithubuser opened this issue Jul 20, 2018 · 1 comment

Comments

@dansgithubuser
Copy link

callback is always called
https://github.com/Tapppi/async-exit-hook/blame/80e692c88e62a88cf5750460ff02c28298e5b09b/readme.md#L60

callback is not always provided

// Cannot perform async hooks in `exit` event

should be

exitHook(callback => {
    setTimeout(() => {
        console.log('exiting 3');
        if(callback) callback();
    }, 1000);
});
@okonet
Copy link

okonet commented Sep 8, 2018

So the source code says it can't call async callbacks on exit. Is this correct? I'm kind'a facing this issue right now and not sure if it's supported or not.

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

No branches or pull requests

2 participants