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

Add specific failure typeLink for async exceptions #3835

Merged
merged 8 commits into from
Feb 22, 2023
Merged

Conversation

SystemFw
Copy link
Contributor

Overview

Adds a ThreadKilledFailure that you can use with tryEval to act on async exceptions specifically.

Implementation notes

Nothing of note

Interesting/controversial decisions

I'm treating all constructors of AsyncException uniformly (ThreadKilled, UserInterrupt, StackOverflow, HeapOverflow).

Test coverage

Tested via the new tests.u machinery. Currently only tested on the interpreter (see below).

Loose ends

  • It can only be tested on the interpreter because the JIT has no typeLinks yet. thread-killed-typeLinks-tests.u should be merged back into concurrency-tests.u when the JIT can run it.
  • Requires a builtin.merge to get ThreadKilledFailure, probably something to include in the next release of base

@SystemFw SystemFw requested review from dolio and pchiusano and removed request for pchiusano and dolio February 21, 2023 17:03
@SystemFw SystemFw marked this pull request as draft February 21, 2023 19:16
@SystemFw SystemFw marked this pull request as ready for review February 21, 2023 23:19
@SystemFw SystemFw marked this pull request as draft February 22, 2023 00:19
@SystemFw SystemFw force-pushed the try-eval-jit branch 3 times, most recently from ceed3b0 to ffb07e1 Compare February 22, 2023 15:17
Copy link
Contributor

@dolio dolio left a comment

Choose a reason for hiding this comment

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

Looks good to me. I don't have a strong opinion about treating the other async exceptions the same. It seems fine, since they're effectively killing the thread in a way that should not be recovered from, just for slightly varying reasons.

@SystemFw SystemFw marked this pull request as ready for review February 22, 2023 16:25
@SystemFw SystemFw merged commit cefcadd into trunk Feb 22, 2023
@SystemFw SystemFw deleted the try-eval-jit branch February 22, 2023 18:28
aryairani pushed a commit that referenced this pull request Feb 15, 2024
at least ThreadKilledFailure, from #3835
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants