// Cancel a pollitem from the reactor, specified by socket or FD. If both
// are specified, uses only socket. If multiple poll items exist for same
// socket/FD, cancels ALL of them.
public void removePoller(PollItem item_) {
PollItem item = item_;
Iterator<SPoller> it = pollers.iterator();
while (it.hasNext()) {
SPoller p = it.next();
if (item.equals(p.item)) {
it.remove();
dirty = true;
}
}
if (verbose)
System.out.printf("I: zloop: cancel %s poller (%s, %s)", item.getSocket() != null ? item.getSocket()
.getType() : "RAW", item.getSocket(), item.getRawSocket());
}