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

[FEATURE]: Explore integrating thread pool for callback execution #3

Open
evan-palmer opened this issue Jan 26, 2023 · 0 comments
Open
Labels
enhancement New feature or request needs triage This issue needs triage support

Comments

@evan-palmer
Copy link
Collaborator

Is your feature request related to a problem? Please describe

The SerialClient class implements support for callbacks after successfully reading data from the serial port; however, these callbacks are executed in the main thread loop and may take a long time to perform which can result in delays in the serial port IO. If it can be done safely, it may be helpful to implement a thread pool to call on to execute the callback functions.

Describe the solution you'd like

Explore a safe way to implement a thread pool which should be used to execute packet callbacks.

Describe alternatives you've considered

Alternatively, this could be left as-is and require users to ensure that their methods do not take significant amounts of time to complete.

Implementation Ideas

Two approaches might be possible. First, it could be valuable to simply integrate the existing Boost thread pool implementation; however, this will integrate an additional dependency and the usage of Boost is generally discouraged. Alternatively, there may be an easy path forward to implement this by hand. Decisions will need to be made regarding how to design the thread pool if that is the case.

Additional context

@evan-palmer evan-palmer added the enhancement New feature or request label Jan 26, 2023
@evan-palmer evan-palmer added the low priority This is a low priority issue label Mar 31, 2023
@evan-palmer evan-palmer added needs triage This issue needs triage support and removed low priority This is a low priority issue labels Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage This issue needs triage support
Projects
None yet
Development

No branches or pull requests

1 participant