prova a non creare un nuovo trhead e usare l'operatore new