Search code examples
erlangnitrogen

Are events always run in the same process in Nitrogen?


I'm taking about event function in Nitrogen, the Erlang web framework, in a web module that is run when you get a postback.

Does event always run in the same process for the same web client (that is, browser window or frame).

I've recall at least one case in which that didn't happen, but I can't reproduce it.


Solution

  • No, Nitrogen events get run in whichever process is currently handling the web request for nitrogen.

    Since Nitrogen is a very asynchronous framework, you may have multiple processes handling multiple events for the same browser window or frame asynchronously. This means that you could very well have different events get handled by seperate processes.