Il while lo devi mettere all'interno del metodo run del thread