Share via


Looper.Quit Method

Definition

Quits the looper.

[Android.Runtime.Register("quit", "()V", "GetQuitHandler")]
public virtual void Quit ();
[<Android.Runtime.Register("quit", "()V", "GetQuitHandler")>]
abstract member Quit : unit -> unit
override this.Quit : unit -> unit
Attributes

Remarks

Quits the looper.

Causes the #loop method to terminate without processing any more messages in the message queue.

Any attempt to post messages to the queue after the looper is asked to quit will fail. For example, the Handler#sendMessage(Message) method will return false.

<p class="note"> Using this method may be unsafe because some messages may not be delivered before the looper terminates. Consider using #quitSafely instead to ensure that all pending work is completed in an orderly manner. </p>

Java documentation for android.os.Looper.quit().

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

See also