adinapoli / threads-supervisor

Simple, IO-based Haskell library for Erlang-inspired thread supervisors
MIT License
29 stars 4 forks source link

refactor: move restart strategy into supervisor #13

Closed srijs closed 8 years ago

srijs commented 8 years ago

In context of the discussion started in #11, this change moves the restart strategy into the supervisor, in preparation for the implementation of the OneForAll strategy.

adinapoli commented 8 years ago

Hey @srijs ! I gave a quick look at your PR and yes, altough we introduce breaking changes, I think that the end result is nice enough to justify those. Firstly because it feels cleaner to decouple the restarting strategy from the retry policy, and secondly it will allow us to extend the library closer to the original Erlang spirit. We should also probably extend the tutorial and make sure it's not obsolete in terms of code shown. Can I ask you to do this before merging?

Thanks for taking the time to contribute!

srijs commented 8 years ago

Sure, updated the tutorial to reflect the new API. Will merge as soon as Travis is green, then.

adinapoli commented 8 years ago

Great, thank you!

Nice work! :tada: