atom / watcher

Atom Filesystem Watcher
MIT License
200 stars 36 forks source link

Construct Hub lazily #201

Closed smashwilson closed 5 years ago

smashwilson commented 5 years ago

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.