Share via


Thread.ThreadId Method

Definition

Returns the identifier of this Thread.

[Android.Runtime.Register("threadId", "()J", "", ApiSince=36)]
public long ThreadId();
[<Android.Runtime.Register("threadId", "()J", "", ApiSince=36)>]
member this.ThreadId : unit -> int64

Returns

this thread's ID

Attributes

Remarks

Returns the identifier of this Thread. The thread ID is a positive long number generated when this thread was created. The thread ID is unique and remains unchanged during its lifetime.

Added in 19.

Java documentation for java.lang.Thread.threadId().

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