Skip to content
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

Setup UncaughtExceptionHandler for WorkerThread #4233

Open
wants to merge 3 commits into
base: series/3.6.x
Choose a base branch
from

Conversation

armanbilge
Copy link
Member

Closes #4232.

@armanbilge armanbilge added this to the v3.6.0 milestone Jan 9, 2025
@djspiewak
Copy link
Member

prePR time

pollingSystem: PollingSystem = SelectorSystem())
: (WorkStealingThreadPool[_], pollingSystem.Api, () => Unit) = {
pollingSystem: PollingSystem = SelectorSystem(),
uncaughtExceptionHandler: Thread.UncaughtExceptionHandler = (_, ex) =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we just use reportFailure?

Copy link
Member Author

@armanbilge armanbilge Jan 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reportFailure is for tasks that fail on the WSTP. uncaughtExceptionHandler is for when the WTs themselves fail, which is effectively fatal. Besides, the default reportFailure in IOApp schedules the printing on the runtime, which is a bad place to send failures about the runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants