Sdílet prostřednictvím


Thread.Daemon Property

Definition

Tests if this thread is a daemon thread. -or- Marks this thread as either a #isDaemon daemon thread or a user thread.

public bool Daemon { [Android.Runtime.Register("isDaemon", "()Z", "")] get; [Android.Runtime.Register("setDaemon", "(Z)V", "")] set; }
[<get: Android.Runtime.Register("isDaemon", "()Z", "")>]
[<set: Android.Runtime.Register("setDaemon", "(Z)V", "")>]
member this.Daemon : bool with get, set

Property Value

true if this thread is a daemon thread; false otherwise.

Attributes

Exceptions

  • if this thread has already started.

Remarks

Property getter documentation:

Tests if this thread is a daemon thread.

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

Property setter documentation:

Marks this thread as either a #isDaemon daemon thread or a user thread. The Java Virtual Machine exits when the only threads running are all daemon threads.

This method must be invoked before the thread is started.

Java documentation for java.lang.Thread.setDaemon(boolean).

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