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

Update exception_list.hpp #6568

Closed
wants to merge 4 commits into from
Closed

Conversation

charan-003
Copy link

This exception_list class in the hpx namespace is a thread-safe container for handling multiple exceptions encountered during parallel algorithm execution. It allows storing std::exception_ptr objects, provides thread-safe access via a spinlock, and includes methods to add exceptions, get the count (size()), and iterate over the stored exceptions (begin()/end()). The class also includes placeholders for retrieving error codes and messages. This is useful for collecting and managing exceptions across parallel threads.

Fixes # [Issue Number]

Proposed Changes
Added exception_list class for managing exceptions in parallel execution
Implemented thread-safe methods for adding and accessing exceptions
Provided placeholders for error code and message retrieval
Any background context you want to provide?
This class addresses the need for managing multiple exceptions in parallel algorithms and ensures thread safety via hpx::spinlock. It simplifies exception handling in concurrent contexts.

Checklist
Not all points below apply to all pull requests.

I have added a new feature and have added tests to go along with it.
I have fixed a bug and have added a regression test.
I have added a test using random numbers; I have made sure it uses a seed, and that random numbers generated are valid inputs for the tests.

This exception_list class in the hpx namespace is a thread-safe container for handling multiple exceptions encountered during parallel algorithm execution. It allows storing std::exception_ptr objects, provides thread-safe access via a spinlock, and includes methods to add exceptions, get the count (size()), and iterate over the stored exceptions (begin()/end()). The class also includes placeholders for retrieving error codes and messages. This is useful for collecting and managing exceptions across parallel threads.
@charan-003 charan-003 requested a review from hkaiser as a code owner November 9, 2024 21:11
@StellarBot
Copy link

Can one of the admins verify this patch?

@hkaiser hkaiser added category: core category: general Everything not fitting into any other label labels Nov 9, 2024
@hkaiser
Copy link
Member

hkaiser commented Nov 9, 2024

@charan-003 two questions:

  • What is the use case that requires for the copy/move construction/assignment to be thread safe?
  • Wouldn't it be better to modify the existing implementations for the functions instead of adding (now duplicate) ones?

@charan-003 charan-003 marked this pull request as draft November 9, 2024 21:47
Copy link

codacy-production bot commented Nov 9, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-85.50% 0.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (5356c52) 234528 200611 85.54%
Head commit (5f31ce5) 120066 (-114462) 51 (-200560) 0.04% (-85.50%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#6568) 34 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@charan-003 charan-003 marked this pull request as ready for review November 10, 2024 00:42
@charan-003 charan-003 closed this Nov 10, 2024
@charan-003 charan-003 reopened this Nov 10, 2024
@charan-003 charan-003 marked this pull request as draft November 10, 2024 21:41
@charan-003
Copy link
Author

@hkaiser Could someone help me debug the CircleCI errors (build-and-test, clang_format, core, depreport, and inspect) on this pull request? Thank you!

@hkaiser
Copy link
Member

hkaiser commented Nov 10, 2024

@hkaiser Could someone help me debug the CircleCI errors (build-and-test, clang_format, core, depreport, and inspect) on this pull request? Thank you!

You have to log in to circleci using your github credentials to see the logs there.

@hkaiser
Copy link
Member

hkaiser commented Dec 17, 2024

Closing as a duplicate of #6570

@hkaiser hkaiser closed this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: core category: general Everything not fitting into any other label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants