I am having flowing scheme:
one data processing process - The_process few data producing processes - workers
what I need to do is to share list foo_list, containing two other large objects list1, dict2,
foo_list = [list1, dict2]
between those processes. Workers should only read from foo_list, but I need them to have consistent corresponding list1 and dict2. The_process should be able to modify those data.
Edit: I need workers to have updated version of foo_list. The_process once in a while updates foo_list and I need workers to start using that updated version as soon as possible.
I have used manager.list from multiprocessing library but profiling showed, that it takes about 25% of the program time, only to get data from the list by worker.
So the question is, is there any other way how to do it? or am I doing it wrong?