versao pthread pronta