<div dir="ltr"><div>Great information, thanks!</div><div>Having this documented helps a lot when trying not to break things. </div><div><br></div><div>BR,</div><div>Ferenc</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 10 February 2014 19:44, Sverker Eriksson <span dir="ltr"><<a href="mailto:sverker.eriksson@ericsson.com" target="_blank">sverker.eriksson@ericsson.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
On 01/28/2014 06:37 PM, Ferenc Holzhauser wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks. The behaviour is quite neatly described in the documentation. If<br>
there is no intention to change it (which is probably the case by now) then<br>
perhaps it is also an idea to remove the experimental warning or replace it<br>
with a more appropriate one about correct use. The name of the directive is<br>
deceptive enough to bring the unwary to ideas and eventually make them<br>
break things.<br>
<br>
If well understood then it can be useful to trigger other things than NIF<br>
loading but I also think that the documentation should generally discourage<br>
that.<br>
<br>
<br>
</blockquote>
<br></div></div>
We will keep on_load as experimental as there are a number of known weak points in current semantics which we therefore might want to change but do not have time to do for OTP 17.0:<br>
<br>
* Doing external call in on_load to the module itself leads to deadlock. This could be handled as a special case and let external calls in the process doing on_load reach the module itself.<br>
<br>
* At upgrade, other processes calling the module get suspended waiting for on_load. We could let them reach the "old" module until on_load_succeeds to not destroy realtime characteristics.<br>
<br>
* At upgrade, no rollback is done if on_load fails.  If we instead delay the upgrade until after on_load succeeds the system will not be left in a "broken" state.<br>
<br>
<br>
/Sverker, Erlang/OTP<br>
<br>
</blockquote></div><br></div>