diff --git benchexec/localexecution.py benchexec/localexecution.py index f227a84d..1bf6e2cc 100644 --- benchexec/localexecution.py +++ benchexec/localexecution.py @@ -162,13 +162,12 @@ def execute_benchmark(benchmark, output_handler): with unfinished_runs_lock: unfinished_runs -= 1 - if not containerexecutor.NATIVE_CLONE_CALLBACK_SUPPORTED: - logging.debug( - "Using sys.setswitchinterval() workaround for #435 in container " - "mode because native callback is not available." - ) - py_switch_interval = sys.getswitchinterval() - sys.setswitchinterval(1000) + logging.debug( + "Using sys.setswitchinterval() workaround for #435 in container " + "mode because native callback is not available." + ) + py_switch_interval = sys.getswitchinterval() + sys.setswitchinterval(1000) # create some workers for i in range(min(benchmark.num_of_threads, unfinished_runs)): @@ -196,8 +195,7 @@ def execute_benchmark(benchmark, output_handler): if energy and cpu_packages: energy = {pkg: energy[pkg] for pkg in energy if pkg in cpu_packages} - if not containerexecutor.NATIVE_CLONE_CALLBACK_SUPPORTED: - sys.setswitchinterval(py_switch_interval) + sys.setswitchinterval(py_switch_interval) if STOPPED_BY_INTERRUPT: output_handler.set_error("interrupted", runSet)