Real-time scheduling of threads in a Gtk application

Hi,

I’m interested in making my multithreaded application use SCHED_RR to make my application run as real-time as possible (using recommendations mentioned in https://stackoverflow.com/a/4987359/24798273). I was wondering what is the maximum priority that I can use for my threads so that I don’t block normal Gtk or Glib functionality in any way.

Any advice or recommendation is appreciated

Edit: The main problem I’m having is that my program receives a boolean data from USB every 4ms. I have to display a green or red box based on the received data being true/false respectively. Since my monitor is 60Hz, I cannot display it without data being buffered over time and I have to use a mechanism such as averaging last 20 read values and then displaying it. If there’s a change, I’m planning to display yellow. If all 20 read are false, then red. If all are true, then, green. I’m just trying to lower that ‘last 20 read’ threshold.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.