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

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

Instance Variable fileDescriptorFactory A factory that creates a new file descriptor. (type: A callable that accepts no arguments and returns an integral file descriptor, suitable for passing to os.close.)
Method exhaust Open file descriptors until EMFILE is reached.
Method release Release all file descriptors opened by exhaust.
Method count Return the number of opened file descriptors.
fileDescriptorFactory =
A factory that creates a new file descriptor. (type: A callable that accepts no arguments and returns an integral file descriptor, suitable for passing to os.close.)
def exhaust(self):

Open file descriptors until EMFILE is reached.

def release(self):

Release all file descriptors opened by exhaust.

def count(self):

Return the number of opened file descriptors.

ReturnsThe number of opened file descriptors; this will be zero if this instance has not opened any. (type: int)
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.