Difference between running external programs and Tasks

The Julia documentation states that external programs run using run(Cmd) are “run as julia 's immediate child process, using fork and exec calls.” By default, julia waits for the program to return, but commands can also be run asynchronously. Run this way, these external programs appear similar to coroutines, i.e., Tasks. Is there any difference between the two besides the fact that one is running an operating system command and the other is running Julia code?

Tasks share memory within Julia, external programs are entirely different OS processes, so they have different file descriptors and different memory spaces.

1 Like