Parallelize pairwise mode with short circuit regions

- parallelization with short circuit regions
- generic async function