@threads and two functions calls inside a loop

You could use @spawn, see Announcing composable multi-threaded parallelism in Julia or the official docs.

2 Likes