change object value in threads using python
问题 I am very new to Python, thus am possibly asking a simple question. I am wrting a multiprocess code with Python: from multiprocessing import Process from multiprocessing import Queue class myClass(object): def __init__(self): self.__i = 0 self.__name = 'rob' return def target_func(self, name, q): self.__name = name print 'Hello', self.__name self.__i += 1 print self.__i q.put([self.__i, self.__name]) return def name(self): return self.__name def i(self): return self.__i if __name__ == '__main