Function asking for data from another Function, With different Modules or either within same modules, Data is copied or referenced?

Variables in elixir are referenced and are immutable until they are asked to mutate.

Message Passing b/w processes : message/data is copied.

When we create a Module and use a Genserver , there are callbacks, and there are Function inside that module

Message Passing b/w processes : message/data is copied. When we create a Module and use a Genserver , there are callbacks which operate on message queue of that genserver. What happens to the methods inside modules how their data is dealt, and Function calls between Function of process , but they are not dependent on message queue??

Functions (they’re not called methods) on modules are executed in whichever process calls them. For GenServer callbacks is just expected that they’re called by a related GenServer process, but there’s nothing enforcing that.

1 Like

Thanks I corrected it,