haskell-fswatch / hfsnotify

Unified Haskell interface for basic file system notifications
BSD 3-Clause "New" or "Revised" License
136 stars 40 forks source link

Ability to control if separate threads should be created to handle events #88

Closed serhiip closed 5 years ago

serhiip commented 5 years ago

I was using this library for a while now and in my case I needed to synchronise all of the threads (MVar)created by hfnotify library. But why create threads at all if I know I'll execute them synchronously. This PR allows to control that via new WatchConfig parameter

serhiip commented 5 years ago

I've updated the PR with recommended changes. Should I also squash my commits into one?

thomasjm commented 5 years ago

No squash needed, I'll merge this now. I'll try to cut a release soon--I might fold in another change or two while we're making breaking API changes.