Welcome! Decided to learn Python. Tell me how to subscribe to an event data change in the process?
I tried something like this:
import multiprocessing as mp
i = 1
i += 1
if __name__ == '__main__':
q = mp.Queue()
p = mp.Process(target=foo, args=(q,))
if not q.empty():
broadcast = q.get()
But then the infinite loop seems useful to the maximum and when they will be a lot of... time.sleep in an infinite loop to use do not want, as you want instant delivery of data.
And in the end the task is that one process receives data, and other processes processors take what they want. However, their number varies during the life of the program.