Known implementations: twisted.internet.test.test_tcp._ExhaustsFileDescriptors, twisted.internet.test.test_tcp.AssertPeerClosedOnEMFILETests.NullExhauster

A way to trigger EMFILE.

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.
def exhaust():

Open file descriptors until EMFILE is reached.

This can raise any exception except an OSError whose errno is EMFILE. Any exception raised to the caller implies release.

def release():

Release all file descriptors opened by exhaust.

def count():

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.