MCPcopy Create free account
hub / github.com/e2wugui/zeze / choice

Method choice

ZezeJava/ZezeJava/src/main/java/Zeze/Net/Selectors.java:150–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148 }
149
150 public @NotNull Selector choice() {
151 Selector[] tmp = selectorList; // thread safe
152 if (tmp == null)
153 throw new IllegalStateException("closed");
154
155 long count = choiceCount.getAndIncrement();
156 int index = (int)Long.remainderUnsigned(count, tmp.length);
157 return tmp[index];
158 }
159
160 public void close() {
161 lock();

Callers 4

testOutputBufferCodecMethod · 0.95
ReliableUdpMethod · 0.80
DatagramSocketMethod · 0.80
TcpSocketMethod · 0.80

Calls

no outgoing calls

Tested by 1

testOutputBufferCodecMethod · 0.76