Android thread priority

Source: Internet
Author: User

Process. setthreadpriority (process. thread_priority_background); // set the thread priority to the background. In this way, when multiple threads are concurrent, the CPU time allocated by many irrelevant threads will be reduced, which is conducive to the processing of the main thread, there are the following types:

Int thread_priority_audio // priority of the thread used for playing standard music

Int thread_priority_background // standard backgroundProgram

Int thread_priority_default // Default Application priority

Int thread_priority_display // standard display system priority, mainly to improve UI refresh

Int thread_priority_foreground // standard foreground thread priority

Int thread_priority_less_favorable // lower than favorable

Int thread_priority_lowest // the lowest priority of valid threads

Int thread_priority_more_favorable // higher than favorable

Int thread_priority_urgent_audio // The standard audio playback priority.

Int thread_priority_urgent_display // The Standard Display priority, which is also applicable to input events.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.