What about Thread.setPriority(...) ?

That seems to be working for me.
When, using the above method, i set the priority of a background-
thread too high it has an impact on the GUI (it gets sluggish). It
must be doing something...


On May 10, 9:20 pm, Krishnakumar Ramachandran
<[email protected]> wrote:
> Hi has anyone got any idea on this?
>
> On Mon, May 10, 2010 at 12:56 PM, KK 
> <[email protected]>wrote:
>
>
>
>
>
> > I have a multithreaded streaming app which has mainly the following 5
> > threads
>
> > 1 Main App(UI) Thread
> > 1 controller thread (in native)
> > 1 audio decoder thread (in native)
> > 1 video decoder thread(in native)
> > 1 thread to query the head position of audio (in Java)
> >  Apart from this I have video rendering with OpenGL.
>
> > My problem is, if I query the thread priority using the
> > Thread.getPriority method (my native threads make callbacks to Java
> > and I am making the query at that point of time), I am getting the
> > priority of each of them as 5. For my audio query thread (the last one
> > in the list) I am explicitly setting the priority using
> > Process.setThreadPriority(Process.THREAD_PRIORITY_URGENT_AUDIO);
>
> > Also for my decoder threads, I am giving higher priority than my
> > controller thread(using pthread APIs in native). But still finally all
> > of them seem to have same priority.
>
> > Can anyone please tell me what is wrong here. Also what should I be
> > doing to increase the priority of my threads(both from Java and
> > native).
>
> > Thanks
> > KK
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%2bunsubs­[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to