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

backend_thread_sleep_duration support #256

Closed
qdztxc opened this issue Feb 21, 2023 · 3 comments · Fixed by #258
Closed

backend_thread_sleep_duration support #256

qdztxc opened this issue Feb 21, 2023 · 3 comments · Fixed by #258
Labels
enhancement New feature or request

Comments

@qdztxc
Copy link

qdztxc commented Feb 21, 2023

From 2.7.0, backend_thread_sleep_duration is replaced by backend_thread_yield.
yield() may not give up cpu. This causes CPU usage of background thread high than sleep wih long duration.

Would you please support both backend_thread_sleep_duration and backend_thread_yield then let user to choose it?

@odygrd odygrd added the enhancement New feature or request label Feb 21, 2023
@odygrd
Copy link
Owner

odygrd commented Feb 21, 2023

hey, I don't mind adding back the sleep

@sfjhkjdsh
Copy link

I looked at this and realized that in Linux with SCHED_OTHER yielding the CPU means a problem with the application design as per man page.

Most common form of scheduling policy is SCHED_OTHER and therefore quill is not actually yielding the CPU like it advertised. But its not really a problem of quill but standard that yielding is implementation dependent and most of the time its not much useful.

@odygrd
Copy link
Owner

odygrd commented May 1, 2023

the backend_sleep is back in v2.8.0 for those who want to use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants