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

'adaptive_wait' has spurious wakeups on Windows #2161

Open
elBoberido opened this issue Jan 16, 2024 · 0 comments
Open

'adaptive_wait' has spurious wakeups on Windows #2161

elBoberido opened this issue Jan 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@elBoberido
Copy link
Member

Brief feature description

adaptive_wait uses std::his_thread::sleep_for(INITIAL_WAITING_TIME) with 100µs for INITIAL_WAITING_TIME as second stage in the waiting strategy. This is done for around 10000 iterations before switching to the final waiting strategy with 10ms steps. On Windows this might result in immediate wakeups and a higher CPU load.

Potential fix

In order to fix the problem nanosleep could be used but unfortunately this is not available on Windows and it is pretty hard to reliably achieve sleep times below 1ms. There are a few option which can be explored

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant