Is Elixir's System.cmd blocking

469 Views Asked by At

I'd like to make a system that pulls github repositories automaticly using

System.cmd("git",["pull", link])

Is this command blocking? If I start it concurrently in many actors will I be always able to get as many pulls as actors (or at least socket limit for the system)?

If not is there anyway to acheive it?

1

There are 1 best solutions below

4
On

Erlang and thus Elixir IO is non-blocking, so the IO of one process does not generally affect other processes in any way. Joe Armstrong describes this in a blog post:

So our code “looks like” we’re doing a synchronous blocking read. Looks like was in quotes, because it’s not actually a blocking read, it’s really an asynchronous read which does not block any other Erlang processes.