Closed tswelsh closed 6 years ago
I stopped being silly and read what forkFinally
actually does. Seems better to follow the original approach and just introduce special handling for ThreadKilled
exceptions, so I've adjusted the PR accordingly.
Please add a changelog note. Otherwise LGTM.
Done - I assumed a minor version bump rather than patch, wasn't terribly sure which it should be. Will change it if you think otherwise.
Yes, I think this counts as a bugfix.
Merged, thanks! 0.2.4.0 bump was actually fine, the users should be able to guard for the presence of this change with a MIN_VERSION_
macro. I was rather undecided whether to do 0.2.4.0 or go for 0.3.0.0, leaning more towards the former.
I'll make a release tomorrow.
Ah right, sorry for the misunderstanding. Thanks for merging!
System/Remote/Monitoring/Statsd.hs:150:24: warning: [-Wincomplete-patterns]
Pattern match(es) are non-exhaustive
In a case alternative:
Patterns not matched:
(Just GHC.IO.Exception.StackOverflow)
(Just GHC.IO.Exception.HeapOverflow)
(Just GHC.IO.Exception.UserInterrupt)
|
150 | Left e -> case fromException e of
| ^^^^^^^^^^^^^^^^^^^^^^^...
That's not very nice... I changed the code to rethrow these ones as well.
Released 0.2.4.0.
Oof yeah that's pretty rubbish, sorry for causing you more work. I just checked how I built it, I wasn't aware that -Wincomplete-patterns
isn't in the standard warning set (I have -Wall
on pretty much permanently for all work projects). Thanks for the speedy release!
Using
finally
after theforkIO
means that most exceptions will still be rethrown on the main thread, butforkIO
will swallowThreadKilled
exceptions so they will no longer get rethrown. Fixes #19.