Compartir a través de


Selector.Close Method

Definition

Closes this selector.

[Android.Runtime.Register("close", "()V", "GetCloseHandler")]
public abstract void Close ();
[<Android.Runtime.Register("close", "()V", "GetCloseHandler")>]
abstract member Close : unit -> unit

Implements

Attributes

Exceptions

if an I/O error occurs.

Remarks

Closes this selector.

If a thread is currently blocked in one of this selector's selection methods then it is interrupted as if by invoking the selector's #wakeup wakeup method.

Any uncancelled keys still associated with this selector are invalidated, their channels are deregistered, and any other resources associated with this selector are released.

If this selector is already closed then invoking this method has no effect.

After a selector is closed, any further attempt to use it, except by invoking this method or the #wakeup wakeup method, will cause a ClosedSelectorException to be thrown.

Java documentation for java.nio.channels.Selector.close().

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