Skip to content

Setup UncaughtExceptionHandler for WorkerThread#4233

Merged
djspiewak merged 4 commits into
typelevel:series/3.6.xfrom
armanbilge:feature/uncaught-exception-handler
Jan 12, 2025
Merged

Setup UncaughtExceptionHandler for WorkerThread#4233
djspiewak merged 4 commits into
typelevel:series/3.6.xfrom
armanbilge:feature/uncaught-exception-handler

Conversation

@armanbilge

Copy link
Copy Markdown
Member

Closes #4232.

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

Copy link
Copy Markdown
Member

prePR time

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

Copy link
Copy Markdown
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?

@armanbilge armanbilge Jan 9, 2025

Copy link
Copy Markdown
Member Author

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.

djspiewak
djspiewak previously approved these changes Jan 11, 2025
@djspiewak
djspiewak merged commit 6f09e61 into typelevel:series/3.6.x Jan 12, 2025
@armanbilge armanbilge linked an issue Jan 15, 2025 that may be closed by this pull request
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.

Configure UncaughtExceptionHandler for WorkerThreads

2 participants