Perf: Fix deadlock when interrupting the process