aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/src/xmerl.appup.src
diff options
context:
space:
mode:
authorRichard Carlsson <[email protected]>2013-09-27 11:07:32 +0200
committerFredrik Gustafsson <[email protected]>2013-11-05 10:55:59 +0100
commitd64c016b8453ac143a6c26493a0fb1908f34ed99 (patch)
tree53dc0a2ebd203ebee2fc3e39f70ce0332eed9fbe /lib/xmerl/src/xmerl.appup.src
parent00a3dade2d58836bca334be36843775343e5e269 (diff)
downloadotp-d64c016b8453ac143a6c26493a0fb1908f34ed99.tar.gz
otp-d64c016b8453ac143a6c26493a0fb1908f34ed99.tar.bz2
otp-d64c016b8453ac143a6c26493a0fb1908f34ed99.zip
Avoid serialization on code_server in xmerl:export()
The inheritance mechanism in xmerl used to use 'catch apply(M,F,Args)' to try different modules M until one was found that had a function F/A. However, when M:F/A does not exist, apply/3 will trap to error_handler:undefined_function/3, which will call code:ensure_loaded(M), making a synchronous request to the code server process. If many processes tried to use xmerl:export() concurrently, they would get serialized waiting for the code server process. This patch uses erlang:function_exported/3 instead to check if M:F/A exists. If M exists, it should already have been loaded at that point due to the inheritance checking in the xmerl:callbacks/1 function.
Diffstat (limited to 'lib/xmerl/src/xmerl.appup.src')
0 files changed, 0 insertions, 0 deletions