INNER CODE UNIT · Python

stop_processes

openHiTLS/openHiTLS · testcode/benchmark/async_perf/run_async_perf.py:73

def stop_processes(processes):
    for process in processes:
        if process.poll() is None:
            process.terminate()
    for process in processes:
        try:
            process.wait(timeout=2)
        except subprocess.TimeoutExpired:
            process.kill()
            process.wait()


def run_batch(args, scenario):
    processes = []
    error = None
    with tempfile.TemporaryFile(mode="w+") as server_log, tempfile.TemporaryFile(mode="w+") as client_log:
        # Separate read descriptor: a shared file offset would interfere with the server's writes.
        with open(f"/proc/self/fd/{server_log.fileno()}") as reader:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…