Wait for last task or job to finish

The parent process (and all tasks) will crash together. That’s the point of using spawn_link.

If you don’t want that, you can start the tasks via a supervisor and use Process.monitor to detect crashes. That’s how Tasks work:

https://github.com/elixir-lang/elixir/blob/v1.5.0/lib/elixir/lib/task.ex#L331

https://github.com/elixir-lang/elixir/blob/v1.5.0/lib/elixir/lib/task.ex#L664