Example. I want to share getFrame and processFrame in seperated threads.
I think that I will make two threads for every action, but I still doesn't know how to set properly priority of threads I mean, I would like to have more priority  for getFrame  thread than processFrame, but If I have only two threads than I can set a priority for getFrame after created this thread, so the priority will be working after done action  by everyone threads. How can I solve it?
Maybe I could create a main thread which will make another two threads for getFrame and processFrame and then I set a priority for getFrame thread?
            Asked
            
        
        
            Active
            
        
            Viewed 75 times
        
    0
            
            
        - 
                    Does [this](https://stackoverflow.com/questions/3649281/how-to-increase-thread-priority-in-pthreads) help? – NathanOliver Jul 05 '18 at 12:59
 - 
                    Are you talking about the scheduling priority? – yadhu Jul 05 '18 at 13:08
 
1 Answers
1
            
            
        If you are trying to change priority of threads to handle events.. to me it looks like a design of system is very weak.
While designing system it's better never to assume thread priority as it could change from system to system based on settings.
Why don't you send an event to other thread and wait for ack back.
        27harishvk
        
- 23
 - 5