You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: