discard nodes when multithread and exit in discarded nodes