I am trying to figure out how data communication between procs is organized, but the docs are a bit vague about this.
Do I understand correctly, that any time you do
@spawnat worker_id somefunc(args...), the arguments to the function call undergo serialization and deserialization. Meaning, you create an independent copy of data with its own storage. And the same happens, when you do fetch?
Is it correct, that julia does serialization/deserialization automatically even for user-defined types, provided this type is defined on the worker?"
What happens with special parallel types, like SharedArrays and DistributedArrays?
I have tried to tinker with SharedArrays. Looks like they are passed by reference, and it is true even if we have SharedArray field inside complex user-defined type. Is it correct observation?