-
Notifications
You must be signed in to change notification settings - Fork 25
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
Improve Inventory::SyncLoop to Avoid Blocking Agent Stop #445
Comments
As a note for when this issue goes into development, the first scan
Can happen while another threads calls |
Is there something to do in regards to this comment? |
Hi @xkazinx |
|
|
Description
The current implementation of the Inventory::SyncLoop function in the Inventory module may cause unnecessary delays during the agent shutdown process. Specifically, the Scan() method is called after the stop condition (m_stopping) is triggered, leading to potential delays if Scan() is a time-consuming operation.
Problem Details
Steps to Reproduce
Proposed Solution
Update the SyncLoop function to verify the m_stopping condition after the wait operation and before calling Scan(). This ensures that no unnecessary Scan() operation is performed after a stop request is issued.
Option
The text was updated successfully, but these errors were encountered: