class documentation

class _ExhaustsFileDescriptors: (source)

Implements interfaces: twisted.internet.test.test_tcp._IExhaustsFileDescriptors

View In Hierarchy

A class that triggers EMFILE by creating as many file descriptors as necessary.

Method count Return the number of opened file descriptors.
Method exhaust Open file descriptors until EMFILE is reached.
Method release Release all file descriptors opened by exhaust.
Instance Variable fileDescriptorFactory A factory that creates a new file descriptor.
Class Variable _log Undocumented
Instance Variable _close Undocumented
Instance Variable _fileDescriptorFactory Undocumented
Instance Variable _fileDescriptors Undocumented
def count(self): (source)

Return the number of opened file descriptors.

Returns
intThe number of opened file descriptors; this will be zero if this instance has not opened any.
def exhaust(self): (source)

Open file descriptors until EMFILE is reached.

def release(self): (source)

Release all file descriptors opened by exhaust.

fileDescriptorFactory: A callable that accepts no arguments and returns an integral file descriptor, suitable for passing to os.close. = (source)

A factory that creates a new file descriptor.

Undocumented

Undocumented

_fileDescriptorFactory: Callable[[], int] = (source)

Undocumented

_fileDescriptors: List[int] = (source)

Undocumented