module autoloading and parallelism

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

module autoloading and parallelism

Xavier Noria
Say two processes running in parallel happen to trigger autoloading of the same module at the same time. How does the error handler manage this situation?


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: module autoloading and parallelism

José Valim-3
Assuming the VM, stdlib and kernel have booted then the request goes to the code server process: https://github.com/erlang/otp/blob/5c917e33b53a397b30ca56a9cdd9922d9df19e7d/lib/kernel/src/error_handler.erl#L41

Before that, it goes to the init process.

In other words, the requests are serialized.



José Valim
Founder and 
Director of R&D


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: module autoloading and parallelism

Xavier Noria
Awesome, thanks José :).

On Wed, Oct 11, 2017 at 12:35 PM, José Valim <[hidden email]> wrote:
Assuming the VM, stdlib and kernel have booted then the request goes to the code server process: https://github.com/erlang/otp/blob/5c917e33b53a397b30ca56a9cdd9922d9df19e7d/lib/kernel/src/error_handler.erl#L41

Before that, it goes to the init process.

In other words, the requests are serialized.



José Valim
Founder and 
Director of R&D



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions