Elixir function doesn't continue if takes too long

A function always executes until it is completed.