Object.Wait Object.Wait Method

Definition

Overloads

Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

Wait() Wait()

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.

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

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

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

Wait(Int64) Wait(Int64)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

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

Parameters

millis
Int64 Int64

the maximum time to wait in milliseconds.

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

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

Wait(Int64, Int32) Wait(Int64, Int32)

Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the specified timeout expires.

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

Parameters

millis
Int64 Int64

the maximum time to wait in milliseconds.

nanos
Int32 Int32

the fraction of a millisecond to wait, specified in nanoseconds.

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

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