properly cancel pruning inside parallel loop