interface documentation

A way to trigger EMFILE.

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

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(): (source)

Release all file descriptors opened by exhaust.