Multiprocessing - One Process Broadcasting to other processes?

I need to broadcast a string or some variable from one process to another. What is the correct way to do this?

I could use a shared memory tensor and write to it and then read it. Is there a better way?

An alternative is to use the torch.distributed.broadcast API.