Amaury Forgeot d'Arc added the comment:

"solution.put(c)" takes a *reference* to the list c.
And then the test() function continues running!

By the time the list is serialized and sent back to the main process (in 
another thread), the test() function has already changed it...

As you noticed, you can use immutable objects instead (string, int), or make a 
copy of the list: solution.put(c.copy())

----------
nosy: +amaury.forgeotdarc
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22600>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to