Selector.Wakeup Method

Definition

Causes the first selection operation that has not yet returned to return immediately.

[Android.Runtime.Register("wakeup", "()Ljava/nio/channels/Selector;", "GetWakeupHandler")]
public abstract Java.Nio.Channels.Selector? Wakeup ();
[<Android.Runtime.Register("wakeup", "()Ljava/nio/channels/Selector;", "GetWakeupHandler")>]
abstract member Wakeup : unit -> Java.Nio.Channels.Selector

Returns

This selector

Attributes

Exceptions

if the selector is closed.

Remarks

Causes the first selection operation that has not yet returned to return immediately.

If another thread is currently blocked in a selection operation then that invocation will return immediately. If no selection operation is currently in progress then the next invocation of a selection operation will return immediately unless #selectNow() or #selectNow(Consumer) is invoked in the meantime. In any case the value returned by that invocation may be non-zero. Subsequent selection operations will block as usual unless this method is invoked again in the meantime.

Invoking this method more than once between two successive selection operations has the same effect as invoking it just once.

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

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