[erlang-questions] Dependencies, included applications and supervision

Jay Nelson jay@REDACTED
Wed Jun 25 22:42:51 CEST 2014

On Jun 25, 2014, at 1:39 PM, Loïc Hoguin <essen@REDACTED> wrote:

> On 06/25/2014 10:32 PM, Jay Nelson wrote:
>> 2) You have to sprinkle ‘ensure_started’ calls throughout your code if there is a
>> dependency. And trust me, you can never be completely assured that it is started
>> at any given moment, ensure_started is yet another race condition.
> I'm sorry what?
> Why would you ever call ensure_started outside of the shell while developing or a test suite? Releases figure out dependencies and start applications in the appropriate order.
> -- 
> Loïc Hoguin
> http://ninenines.eu

Why does crypto code always do this?
What if your application goes down but doesn’t take the VM with it?
If there is a dependency, you must ensure that the required application
is started, not just when you start your application, but at any time later
after which it may have subsequently failed.

More information about the erlang-questions mailing list