Udostępnij za pośrednictwem


Process.SetThreadPriority Method

Definition

Overloads

SetThreadPriority(Int32, ThreadPriority)

Set the priority of a thread, based on Linux priorities.

SetThreadPriority(ThreadPriority)

Set the priority of the calling thread, based on Linux priorities.

SetThreadPriority(Int32, ThreadPriority)

Set the priority of a thread, based on Linux priorities.

[Android.Runtime.Register("setThreadPriority", "(II)V", "")]
public static void SetThreadPriority (int tid, Android.OS.ThreadPriority priority);
[<Android.Runtime.Register("setThreadPriority", "(II)V", "")>]
static member SetThreadPriority : int * Android.OS.ThreadPriority -> unit

Parameters

tid
Int32

The identifier of the thread/process to change.

priority
ThreadPriority

A Linux priority level, from -20 for highest scheduling priority to 19 for lowest scheduling priority.

Attributes

Exceptions

Throws IllegalArgumentException if tid does not exist.

Throws SecurityException if your process does not have permission to modify the given thread, or to use the given priority.

Remarks

Set the priority of a thread, based on Linux priorities.

Java documentation for android.os.Process.setThreadPriority(int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetThreadPriority(ThreadPriority)

Set the priority of the calling thread, based on Linux priorities.

[Android.Runtime.Register("setThreadPriority", "(I)V", "")]
public static void SetThreadPriority (Android.OS.ThreadPriority priority);
[<Android.Runtime.Register("setThreadPriority", "(I)V", "")>]
static member SetThreadPriority : Android.OS.ThreadPriority -> unit

Parameters

priority
ThreadPriority

A Linux priority level, from -20 for highest scheduling priority to 19 for lowest scheduling priority.

Attributes

Exceptions

Throws IllegalArgumentException if tid does not exist.

Throws SecurityException if your process does not have permission to modify the given thread, or to use the given priority.

Remarks

Set the priority of the calling thread, based on Linux priorities. See #setThreadPriority(int, int) for more information.

Java documentation for android.os.Process.setThreadPriority(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

See also

  • <xref:Android.OS.Process.SetThreadPriority(System.Int32%2c+Android.OS.ThreadPriority)>

Applies to