Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Construct Hub lazily #201

Merged
merged 2 commits into from
Jan 7, 2019
Merged

Construct Hub lazily #201

merged 2 commits into from
Jan 7, 2019

Conversation

smashwilson
Copy link
Contributor

It looks like uv_async_init() prevents Node's event loop from exiting cleanly, even with the worker thread not launched yet. Defer constructing the Hub singleton until the first time it's interacted with to prevent that call from being performed immediately on module require.

Another take on #185.

@smashwilson smashwilson merged commit 6c0a4eb into master Jan 7, 2019
@smashwilson smashwilson deleted the aw/dont-hang branch January 7, 2019 20:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant