def METHOD_NAME(self):
    ncpus = lit.util.usable_core_count()
    desired_limit = self.workers * ncpus * 2 # the 2 is a safety factor
    # Importing the resource module will likely fail on Windows.
    try:
        import resource
        NPROC = resource.RLIMIT_NPROC
        soft_limit, hard_limit = resource.getrlimit(NPROC)
        desired_limit = min(desired_limit, hard_limit)
        if soft_limit < desired_limit:
            resource.setrlimit(NPROC, (desired_limit, hard_limit))
            self.lit_config.note('Raised process limit from %d to %d' % \
                                    (soft_limit, desired_limit))
    except Exception as ex:
        # Warn, unless this is Windows, in which case this is expected.
        if os.name != 'nt':
            self.lit_config.warning('Failed to raise process limit: %s' % ex)