[erlang-bugs] proc_lib relies on immutable dictionary
mats cronqvist
masse@REDACTED
Fri Nov 28 09:02:25 CET 2008
"Bjorn Gustavsson" <bgustavsson@REDACTED> writes:
> On Thu, Nov 27, 2008 at 2:30 PM, mats cronqvist <masse@REDACTED> wrote:
>>
>> exit_p(Class, Reason) ->
>> {M,F,A} = get('$initial_call'),
>> MFA = {M,F,make_dummy_args(A, [])},
>> crash_report(Class, Reason, MFA),
>> exit(Reason).
>>
>> exit_p now (for no apparent reason) relies on the user not clearing
>> the dictionary.
>
> My fault. I noticed that the initial MFA was passed around in the loop
> just to be just when the process
> exited, which I found wasteful as the the value could just as well be
> retrieved from the process dictionary.
i can think of one semi-good reason; process pools. E.g, yaws has a
pool of acceptor processes. this btw is how i found it.
otoh, i don't think proc_lib should break, no matter how silly
it might be to clear the dictionary.
mats
More information about the erlang-bugs
mailing list