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

Implement Multi-Threading into the Codebase #58

Merged
merged 33 commits into from
Jul 29, 2023

Conversation

ClayJay3
Copy link
Collaborator

@ClayJay3 ClayJay3 commented Jul 27, 2023

This PR implements an interface class that aims to give programmers the ability to easily multi-thread their code without worrying about low-level thread and memory management. Just inherit the base class and implement a couple pure virtual functions.

Since resource access management (resource locking) for the users implemented code can not be controlled internally by the interface, users should know when and how to acquire locks with mutexes and they should also use atomic whenever possible. A guide detailing this will be implemented shortly.

- Implemented AutonomyThread bass class.
    - High level thread management
    - All threaded code implemented in pure virtual functions
    - Thread pool functionality
    - Loop parallelizer functionality
    - Guaranteed safe shutdown of threads
    - Ability to return templated type from thread pool
- Added two threading examples
    -   A prime number calculator
    -  An Aruco tag generator

Closes issue #29

ClayJay3 added 26 commits July 16, 2023 20:56
… now only for internal use as a utility to the main thread.
@ClayJay3 ClayJay3 added enhancement Requests for new features or improvements to existing features. 5-Star Indicates a very difficult task, suitable for experts or those with extensive experience, requiring labels Jul 27, 2023
@ClayJay3 ClayJay3 added this to the URC 2024 - Sprint 0 milestone Jul 27, 2023
@ClayJay3 ClayJay3 requested a review from Byrdman32 July 27, 2023 01:47
@ClayJay3 ClayJay3 self-assigned this Jul 27, 2023
@ClayJay3 ClayJay3 linked an issue Jul 27, 2023 that may be closed by this pull request
@ClayJay3 ClayJay3 temporarily deployed to github-pages July 27, 2023 01:47 — with GitHub Actions Inactive
@ClayJay3 ClayJay3 changed the title Topic/multithreading infrastructure Implement Multi-Threading into the Codebase Jul 27, 2023
Copy link
Member

@Byrdman32 Byrdman32 left a comment

Choose a reason for hiding this comment

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

Overall looks good. Please look at the comments and modify or justify the method/reason for doing it the way implemented.

@ClayJay3 ClayJay3 temporarily deployed to github-pages July 28, 2023 03:00 — with GitHub Actions Inactive
Copy link
Collaborator Author

@ClayJay3 ClayJay3 left a comment

Choose a reason for hiding this comment

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

All comments resolved, and requested changes have been made.

@ClayJay3 ClayJay3 requested a review from Byrdman32 July 28, 2023 03:09
Copy link
Member

@Byrdman32 Byrdman32 left a comment

Choose a reason for hiding this comment

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

Making the one change requested in the devcontainer.json file and then it looks like it will be ready for merging.

@ClayJay3 ClayJay3 temporarily deployed to github-pages July 29, 2023 03:29 — with GitHub Actions Inactive
@ClayJay3 ClayJay3 temporarily deployed to github-pages July 29, 2023 03:30 — with GitHub Actions Inactive
@ClayJay3 ClayJay3 requested a review from Byrdman32 July 29, 2023 03:31
@ClayJay3 ClayJay3 temporarily deployed to github-pages July 29, 2023 03:32 — with GitHub Actions Inactive
Copy link
Member

@Byrdman32 Byrdman32 left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for your patience.

@ClayJay3 ClayJay3 merged commit 0abf765 into development Jul 29, 2023
@ClayJay3 ClayJay3 deleted the topic/multithreading-infrastructure branch July 29, 2023 03:54
MRDT-Software pushed a commit that referenced this pull request May 14, 2024
…ructure

Implement Multi-Threading into the Codebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5-Star Indicates a very difficult task, suitable for experts or those with extensive experience, requiring enhancement Requests for new features or improvements to existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Multi-Threading into the Codebase
2 participants