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

Add a this_thread::sleep_for call into event loops to prevent CPU pinning #41

Open
mathemaphysics opened this issue Jul 19, 2022 · 0 comments
Assignees

Comments

@mathemaphysics
Copy link
Owner

While the IConnecitonHandler and children have sleep statements within them to prevent CPU pinning, the IWorker objects used to do the actual work for IAMQPWorker instances do not. These result in CPU pinning, causing the CPU usage to read very high when nothing is actually being done. Even worse it eats up energy.

Insert a std::this_thread::sleep_for(std::chrono::milliseconds(10)) into the root IWorker and FWorker classes to make them realistic to use for anything.

@mathemaphysics mathemaphysics self-assigned this Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant