for parallel with omp
    lock still with mutex