EpollSelectDispatcher.unregister

Removes a client registration. Does not fail/throw if the client is not registered.

class EpollSelectDispatcher
int
unregister

Parameters

client ISelectClient

client to unregister

remove_from_selected_set bool

if true, removes the client from the selected set that may be currently being iterated over. This guarantees that the unregistered client's handle method will not be subsequently called by the selector. The client may thus be safely destroyed after unregistering.

Return Value

Type: int

0 if everything worked as expected or the error code (errno) as a warning on minor errors, that is, everything except ENOMEM (out of memory) and EINVAL (invalid epoll file descriptor or epoll_ctl() opcode). ENOENT is a minor error that happens regularly when the client was unexpectedly unregistered as it happens when its file descriptor is closed.

Throws

EpollException on the fatal errors ENOMEM and EINVAL.

Meta