Compartilhar via


ReferenceQueue.Remove Method

Definition

Overloads

Remove()

Removes the next reference object in this queue, blocking until one becomes available.

Remove(Int64)

Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.

Remove()

Removes the next reference object in this queue, blocking until one becomes available.

[Android.Runtime.Register("remove", "()Ljava/lang/ref/Reference;", "GetRemoveHandler")]
public virtual Java.Lang.Ref.Reference? Remove ();
[<Android.Runtime.Register("remove", "()Ljava/lang/ref/Reference;", "GetRemoveHandler")>]
abstract member Remove : unit -> Java.Lang.Ref.Reference
override this.Remove : unit -> Java.Lang.Ref.Reference

Returns

A reference object, blocking until one becomes available

Attributes

Exceptions

if the blocking call was interrupted

Remarks

Removes the next reference object in this queue, blocking until one becomes available.

Java documentation for java.lang.ref.ReferenceQueue.remove().

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

Remove(Int64)

Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.

[Android.Runtime.Register("remove", "(J)Ljava/lang/ref/Reference;", "GetRemove_JHandler")]
public virtual Java.Lang.Ref.Reference? Remove (long timeout);
[<Android.Runtime.Register("remove", "(J)Ljava/lang/ref/Reference;", "GetRemove_JHandler")>]
abstract member Remove : int64 -> Java.Lang.Ref.Reference
override this.Remove : int64 -> Java.Lang.Ref.Reference

Parameters

timeout
Int64

If positive, block for up to timeout milliseconds while waiting for a reference to be added to this queue. If zero, block indefinitely.

Returns

A reference object, if one was available within the specified timeout period, otherwise null

Attributes

Exceptions

if timeoutMillis .

if the blocking call was interrupted

Remarks

Removes the next reference object in this queue, blocking until either one becomes available or the given timeout period expires.

This method does not offer real-time guarantees: It schedules the timeout as if by invoking the Object#wait(long) method.

Java documentation for java.lang.ref.ReferenceQueue.remove(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.

Applies to