Implementando join com as threads