EpollSelectDispatcher.changeClient

Changes the clients of a registered conduit from current to next.

- current and next are expected to share the the same file descriptor (conduit file handle), - current is expected to be registered while next is expected not to be registered. It is tolerated if current is unexpectedly unregistered as it happens when its file descriptor is closed.

Important note: next is stored in a memory location not managed by the D runtime memory manager (aka Garbage Collector). Therefore it is important that the caller makes sure next is stored somewhere visible to the GC (in a class variable, for example) so it won't get garbage collected and deleted.

class EpollSelectDispatcher
bool
changeClient

Parameters

current ISelectClient

currently registered client to be unregistered

next ISelectClient

currently unregistered client to be registered, please make sure it is stored somewhere visible to the garbage collector

Return Value

Type: bool

true if everything worked as expected or false if current is unexpectedly unregistered as it happens when its file descriptor is closed.

Throws

EpollException on error.

In: - current and next must have the the same file descriptor, - current.is_registered must be true, - next.is_registered must be false.

Meta