You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi vityafx, thanks for this useful crate :)
I'm trying to set the highest real-time highest priority for low-latency audio operation.
let thread_id = thread_native_id();set_thread_priority(thread_id,ThreadPriority::Max,ThreadSchedulePolicy::Realtime(RealtimeThreadSchedulePolicy::Fifo)).unwrap();
This always fails with: Err value: Pthread(22), whereas this is fine:
Thank you for reporting an issue! I am going to look at it as I have time. As of now, I know that the error you have (Pthread(22)) is this:
EINVAL prio is not valid for the scheduling policy of the specified thread.
So, there is something related to priority which I pass to the function. I am going to work on it more but a bit later, just posting this info here for letting you know I got your problem.
Thanks :)
I also noticed that the priority in the end, as shown by top when listing threads is not as high as another audio C++ program I was looking at (when using set_thread_schedule_policy)
I am sorry, I realized I don't have a time to work on it this week. I already have guesses why this can happen but I have not tested it yet. I'll try doing it in the end of weekend or next week.
Thank you guys for participating in this. I have time now and see this has already been fixed. I am closing this, but if you have something to say or to fix in this issue, feel free to mention it.
Activity
iddm commentedon Apr 5, 2018
Thank you for reporting an issue! I am going to look at it as I have time. As of now, I know that the error you have (
Pthread(22)) is this:So, there is something related to priority which I pass to the function. I am going to work on it more but a bit later, just posting this info here for letting you know I got your problem.
supercurio commentedon Apr 5, 2018
Thanks :)
I also noticed that the priority in the end, as shown by top when listing threads is not as high as another audio C++ program I was looking at (when using set_thread_schedule_policy)
iddm commentedon Apr 6, 2018
I am sorry, I realized I don't have a time to work on it this week. I already have guesses why this can happen but I have not tested it yet. I'll try doing it in the end of weekend or next week.
iddm commentedon Apr 23, 2018
Sorry, still have no time. Can't give you any forecast.
surban commentedon Oct 4, 2018
This is caused by set_thread_priority not setting the scheduling policy as documented. See #5 for a fix.
iddm commentedon Jun 15, 2019
Thank you guys for participating in this. I have time now and see this has already been fixed. I am closing this, but if you have something to say or to fix in this issue, feel free to mention it.