-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setters for the failure and starvation reporters in IOApp #4010
base: series/3.x
Are you sure you want to change the base?
Add setters for the failure and starvation reporters in IOApp #4010
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.