guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

Remove Listen::Internals::ThreadPool #480

Closed jonathanhefner closed 4 years ago

jonathanhefner commented 4 years ago

Listen::Internals::ThreadPool manages all listener threads. Thus the only way to kill and subsequently garbage collect listener threads is by calling the Listen::Internals::ThreadPool.stop method (typically done via Listen.stop). This is a problem when individual listeners must be stopped and abandoned for garbage collection.

This commit removes Listen::Internals::ThreadPool in favor of listener instances managing their own threads.

Partially addresses #476.


/cc @headius

This is based on top of #477, so that should probably be merged first. Together, these PRs fix #476.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.9%) to 97.178% when pulling dff4a4ee6974b5a781e4886ec1917f79069ff7b6 on jonathanhefner:remove-thread_pool into b464228f868632811721358055043d492423fcf3 on guard:master.

ioquatix commented 4 years ago

I am manually rebasing and merging.