Object.Wait Method

Definition

Overloads

Wait()

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

Wait(Int64, Int32)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

Wait(Int64)

Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.

Wait()

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object.

[Android.Runtime.Register("wait", "()V", "")]
public void Wait ();
[<Android.Runtime.Register("wait", "()V", "")>]
member this.Wait : unit -> unit
Attributes

Exceptions

if the thread calling this method is not the owner of this object's monitor.

if the current thread has been interrupted. The interrupted status of the current thread will be cleared before the exception is thrown.

Remarks

Java documentation for java.lang.Object.wait().

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

Applies to

Wait(Int64, Int32)

Causes the current thread to wait until another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

[Android.Runtime.Register("wait", "(JI)V", "")]
public void Wait (long timeout, int nanos);
[<Android.Runtime.Register("wait", "(JI)V", "")>]
member this.Wait : int64 * int -> unit

Parameters

timeout
Int64

the maximum time to wait in milliseconds.

nanos
Int32

additional time, in nanoseconds range 0-999999.

Attributes

Exceptions

if millis , nanos or nanos > 999999.

if the thread calling this method is not the owner of this object's monitor.

if the current thread has been interrupted. The interrupted status of the current thread will be cleared before the exception is thrown.

Remarks

Java documentation for java.lang.Object.wait(long, 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

Applies to

Wait(Int64)

Causes the current thread to wait until either another thread invokes the java.lang.Object#notify() method or the java.lang.Object#notifyAll() method for this object, or a specified amount of time has elapsed.

[Android.Runtime.Register("wait", "(J)V", "")]
public void Wait (long timeout);
[<Android.Runtime.Register("wait", "(J)V", "")>]
member this.Wait : int64 -> unit

Parameters

timeout
Int64

the maximum time to wait in milliseconds.

Attributes

Exceptions

if the thread calling this method is not the owner of this object's monitor.

if the current thread has been interrupted. The interrupted status of the current thread will be cleared before the exception is thrown.

Remarks

Java documentation for java.lang.Object.wait(long).

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

Applies to