Ok, finally I seem to have found out some more of what is happening. I am able to set any priority > 0. But if I try priorities <= 0 it throws an exception. For all my practical purposes, positive priorities are enough. But anyone has any idea what application is not allowed to use any priorities <= 0?
Thanks KK On May 11, 9:16 pm, Streets Of Boston <flyingdutc...@gmail.com> wrote: > It could be that thethread'sThreadGroup has a maximumpriorityof 5. > Athread'sprioritycannot be higher than it'sthread-group max-priority. > > It could be that some code you didn't code, but call instead, that > sets thethreadpriorityto 5. > > On May 10, 11:37 pm, Krishnakumar Ramachandran > > > > > > <krishnakumar.ramachand...@gmail.com> wrote: > > I tried that too. But still when I try to query my audiothread'spriority, > > it still shows itspriorityas 5. > > > On Tue, May 11, 2010 at 8:25 AM, Streets Of Boston > > <flyingdutc...@gmail.com>wrote: > > > > What aboutThread.setPriority(...) ? > > > > That seems to be working for me. > > > When, using the above method, isetthepriorityof a background- > > >threadtoo high it has an impact on the GUI (it gets sluggish). It > > > must be doing something... > > > > On May 10, 9:20 pm, Krishnakumar Ramachandran > > > <krishnakumar.ramachand...@gmail.com> wrote: > > > > Hi has anyone got any idea on this? > > > > > On Mon, May 10, 2010 at 12:56 PM, KK < > > > krishnakumar.ramachand...@gmail.com>wrote: > > > > > > I have a multithreaded streaming app which has mainly the following 5 > > > > > threads > > > > > > 1 Main App(UI)Thread > > > > > 1 controllerthread(in native) > > > > > 1 audio decoderthread(in native) > > > > > 1 video decoderthread(in native) > > > > > 1threadto query the head position of audio (inJava) > > > > > Apart from this I have video rendering with OpenGL. > > > > > > My problem is, if I query thethreadpriorityusing the > > > > >Thread.getPriority method (my native threads make callbacks toJava > > > > > and I am making the query at that point of time), I am getting the > > > > >priorityof each of them as 5. For my audio querythread(the last one > > > > > in the list) I am explicitly setting thepriorityusing > > > > > Process.setThreadPriority(Process.THREAD_PRIORITY_URGENT_AUDIO); > > > > > > Also for my decoder threads, I am giving higherprioritythan my > > > > > controllerthread(using pthread APIs in native). But still finally all > > > > > of them seem to have samepriority. > > > > > > Can anyone please tell me what is wrong here. Also what should I be > > > > > doing to increase thepriorityof my threads(both fromJavaand > > > > > 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 > > > android-developers@googlegroups.com > > > > > To unsubscribe from this group, send email to > > > > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs > > > > > cr...@googlegroups.com> > > > <android-developers%2bunsubscr...@googlegroups.com> > > > > > 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 android-developers@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs > > > > cr...@googlegroups.com> > > > > 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 android-developers@googlegroups.com > > > To unsubscribe from this group, send email to > > > android-developers+unsubscr...@googlegroups.com<android-developers%2Bunsubs > > > cr...@googlegroups.com> > > > 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 android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > 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 android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group > athttp://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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en