diff options
author | Björn Gustavsson <[email protected]> | 2016-05-03 06:51:25 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-05-04 10:21:30 +0200 |
commit | 7a1ff887383674e786a7c22aceefb0365ed91818 (patch) | |
tree | 4135603ed3372a6eb464f6ff20e05bfac5730130 /system/doc | |
parent | f8e4ac533d388b39d5980092e5dd7a9d4ffee60b (diff) | |
download | otp-7a1ff887383674e786a7c22aceefb0365ed91818.tar.gz otp-7a1ff887383674e786a7c22aceefb0365ed91818.tar.bz2 otp-7a1ff887383674e786a7c22aceefb0365ed91818.zip |
Correctly handle multiple load attempts when on_load is pending
If an on_load function had not yet returned, the code server
would only correctly handle calls to code:ensure_loaded/1. That
is, each process that called code:ensured_loaded/1 for the
module in question would be suspended until the on_load function
had returned.
The code server handled calls to code:load_binary/1, code:load_file/1,
and code:load_abs/1 in the same way as for code:ensure_loaded/1.
That means that if call to one those functions attempted to load
*different* code for the module, that code would not get loaded.
Note that code:finish_loading/1 (code:atomic_load/1) will still return
{error,pending_on_load} if there is a pending on_load function for one
of the modules that are about to be loaded. The reason is that
code:finish_loading/1 is meant to either succeed directly, or fail
quickly if there is any problem.
Diffstat (limited to 'system/doc')
0 files changed, 0 insertions, 0 deletions