Is there a way to change values after they have been put into a queue? For instance, if I have a queue that has a couple variables in it, could I sum the first variable with some other value not in the queue? Would the best way to do this be something like:
x = queue.get()
queue.put(x+some_value)
Or is there a way to do it without removing the object from the queue first?
You probably want shared values such as multiprocessing.Value, multiprocessing.Array, not queue. Queue doesn’t allow it.