title: How to pass a dict to a python thread that can be changed from outside of thread without using queue
body: <p>I would like to have a shared dict between my threads without using Queue. I did it before by making thread with an object in python but now I want to make thread with just one function of object not all of it. my simplified code is as follow:</p>
  
  <pre><code> #!/usr/bin/python
   import threading
   import time
  
  
   class WebSocket(threading.Thread):
       def __init__(self, server=1, sock=1, address=1):
           self.s1=server
           self.s2=sock
           self.s3=address
           print "salam"
  
  
       def CheckThread(self):
           self.a={'1':1, '2':2}
           s=threading.Thread(target=self.SockFun, kwargs=self.a)
           s.deamon=True
           s.start()
  
           while(1):
               self.a['1']=self.a['1']+1
               time.sleep(1)
  
       def SockFun(self,**kwargs):
           pass
  
   class SimpleEcho(WebSocket):
       def SockFun(self,**kwargs):
           while(1):
               print kwargs
               time.sleep(1)
  
       def handleMessage(self):
           self.CheckThread()
  
   s=SimpleEcho()
   s.handleMessage()
  </code></pre>
  
  <p>my printed dict element '1' of kwargs does not increase as expected inside thread:</p>