make sure to properly remove a thread from the table when it disappears because of a timeout