if you don't use "pop" but rather use a normal for loop or a forEach, you won't need `threadsToRemove` afterwards