class documentation

Context manager that allows for a temporary change to a resource limit exposed by the resource package.

Example:

   import resource
   import fiftyone.core.utils as fou

   with fou.ResourceLimit(resource.RLIMIT_NOFILE, soft=4096):
       # temporarily do things with up to 4096 open files

Args:
   limit: the name of the resource to limit. Must be the name of a
       constant in the ``resource`` module starting with ``RLIMIT``. See
       the documentation of the ``resource`` module for supported values
   soft (None): a new soft limit to apply, which cannot exceed the hard
       limit. If omitted, the current soft limit is maintained
   hard (None): a new hard limit to apply. If omitted, the current hard
       limit is maintained
   warn_on_failure (False): whether to issue a warning rather than an
       error if the resource limit change is not successful
Method __enter__ Undocumented
Method __exit__ Undocumented
Method __init__ Undocumented
Instance Variable _hard Undocumented
Instance Variable _hard_orig Undocumented
Instance Variable _limit Undocumented
Instance Variable _soft Undocumented
Instance Variable _soft_orig Undocumented
Instance Variable _supported_platform Undocumented
Instance Variable _warn_on_failure Undocumented
def __enter__(self): (source)

Undocumented

def __exit__(self, *args): (source)

Undocumented

def __init__(self, limit, soft=None, hard=None, warn_on_failure=False): (source)

Undocumented

Undocumented

_hard_orig = (source)

Undocumented

Undocumented

Undocumented

_soft_orig = (source)

Undocumented

_supported_platform: bool = (source)

Undocumented

_warn_on_failure = (source)

Undocumented