adinapoli / threads-supervisor

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

Add epoch to letters and children #23

Closed adinapoli closed 8 years ago

adinapoli commented 8 years ago

cc @srijs

As I'm on Easter holidays over here, I spent 2 hours of hacking time doing 2 things:

  1. Adding the concept of "epochs" as you suggested, so that we can ignore stale DeadLetters. I have also cleaned up the restartChild section, got rid of the yielded Bool in favour of a more richer data structure RestartResult and finally moved emitting the events down to handleEvents, it seems just much cleaner.
  2. I fixed a bug in handleEvent where my typeOf check was never firing. The subtleties was that what we had as input of typeOf was SomeException thus that check was always yielding False regardless which kind of Exception we had as input. Yikes!
coveralls commented 8 years ago

Coverage Status

Coverage decreased (-2.07%) to 85.621% when pulling 048c5bc24895b0e742e58553f457c0a5c575f363 on add-epoch-to-letters-and-children into da93c5f20ff36c00661ac4764a13637188cc7e66 on master.