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

ASYNC: Improved error status transfer from workers to main thread #2256

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

MichaelHuth
Copy link
Collaborator

If a thread was aborted through a regular AbortOnValue this was caught but only a possible RTE was evaluated. Thus, the readout function could not determine if the thread was aborted or not.

Changes:

  • The readout function now uses ASYNC_ReadOutStruct as single argument. This allows extensions without changing all function APIs. The structure includes the former values for dfr, RTE code, RTE message and now additionally the V_abortCode. The RTE message must be included here as it has to be retrieved as soon as it happened (in the thread) and needs to be trnasported then to the main thread as well.
  • The user readout function can evaluate then both error conditions and react accordingly.
  • Tests

close #2252

@MichaelHuth MichaelHuth self-assigned this Sep 9, 2024
If a thread was aborted through a regular AbortOnValue this was caught
but only a possible RTE was evaluated. Thus, the readout function
could not determine if the thread was aborted or not.

Changes:
- The readout function now uses ASYNC_ReadOutStruct as single argument.
  This allows extensions without changing all function APIs.
  The structure includes the former values for dfr, RTE code, RTE message
  and now additionally the V_abortCode.
  The RTE message must be included here as it has to be retrieved as soon as
  it happened (in the thread) and needs to be trnasported then to
  the main thread as well.
- The user readout function can evaluate then both error conditions and react
  accordingly.
- Tests
@MichaelHuth MichaelHuth force-pushed the feature/2256-improve_async_error_handling branch from 66a8bae to 9a0fbf4 Compare September 9, 2024 15:59
@MichaelHuth MichaelHuth assigned t-b and unassigned MichaelHuth Sep 9, 2024
@t-b t-b enabled auto-merge September 9, 2024 18:46
@t-b t-b removed their assignment Sep 9, 2024
@t-b t-b merged commit 939b261 into main Sep 9, 2024
20 checks passed
@t-b t-b deleted the feature/2256-improve_async_error_handling branch September 9, 2024 21:32
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.

ASYNC: Add handling for V_AbortCode from AbortOnValue in threads
2 participants