Add setters for the failure and starvation reporters in IOApp#4010
Add setters for the failure and starvation reporters in IOApp#4010BalmungSan wants to merge 1 commit intotypelevel:series/3.xfrom
Conversation
2525029 to
60a0934
Compare
60a0934 to
6f20d0a
Compare
6f20d0a to
7020e37
Compare
| // Eventually this will be needed: | ||
| // reportFailure = t => | ||
| // IO(_failureReporter) | ||
| // .flatMap(_.apply(t)) | ||
| // .unsafeRunAndForgetWithoutCallback()(runtime) |
There was a problem hiding this comment.
IORuntime.createEventLoop does not receive a reportFailure argument.
Thus, I guess native either doesn't have this problem or the reporting functionality has not been implemented yet. I am assuming the latter, thus I decide to leave this ready to be called once that functionality is implemented.
|
As reporter of #3993 I'm wondering if the starvation reporter is anything special here. Errors are usually reported by printing to sdterr (e.g., It is in that sense that I'm asking if starvation reporter is anything special, would it make sense to rather add (and allow overriding) something like |
|
I think I'm still pretty uncomfortable with this approach. I definitely agree the current API is clunky and forces users to deal with some annoying unsafety, but I'm not sure this type of blunt stateful approach is right either. Punting to 3.7 to give us more time to think about it. |
As promised in Discord.
c.c. @armanbilge @djspiewak
I will fix tests if we decide to move forward with this approach.
For now, I am more interested in gathering feedback about the proposal.