Skip to content

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

@mathemaphysics

Description

@mathemaphysics

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.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions