Create UnsafeNonFatal for use in the fiber runtime#4263
Conversation
|
Thanks for the PR!! Sorry, would you mind re-targeting to the |
569d1c9 to
ee6f0b8
Compare
Done. |
3970f74 to
58a9c5d
Compare
0a76d0f to
dd85c6f
Compare
* Change visibility to only be used in `cats-effect` * Change implementation to not allocate `Some` if Fatal.
7d6dc58 to
83fecb9
Compare
|
Note, there is a reference to |
Why can't they access it? |
Because |
Looks like |
|
Ah, of course... could we put this in Also, I don't really like the |
What about |
Do we really need it in the other places? Fatal exceptions are a runtime concern, and all the fatal error handling machinery is in core, because that is where the runtime lives. Meanwhile, if we pursue this thread we actually should consider moving it to Cats, which also uses |
I started with |
I agree that it shouldn't be used elsewhere. In my experience, handling |
durban
left a comment
There was a problem hiding this comment.
Yeah ok, fair enough. I'll stop nitpicking now... :-)
UnsafeNonFatal is also fine, I was just hoping someone'll have a better idea 🤷♂️
UnsafeNonFatal for use in the fiber runtime
Creates a custom
NonFataltype for use in the fiber runtime. This is needed because while application code generally shouldn't catchInterruptedException, the fiber runtime is responsible for dealing with interrupts gracefully.Initially I considered naming this
RuntimeNonFatal, however I thinkUnsafeNonFatalmakes it really clear that you shouldn't use it without knowing what you are doing.Will resolve #4254