title: Global variable increment and python multiprocessing
body: <p>Hi I have following multiprocess code and I want to ensure that global variable ctr should get updated by all end nodes or leaves of decision tree. But it not happening.</p>
  
  <pre><code>    ctr=0
  
              def update(l,n):
                 global ctr
                 l.acquire()
                 ctr+=n
                 l.release()
  
      def func(x,i):
          p2=[]
          if i &gt; 100:
             lock=Lock()
                          update(lock,len(rl))
          # create list a1
          # create list a2
          i=len(a1)
          for a in a1:
              for b in a2:
                  if x &gt; (a+b):
                      proc=Process(target=func,args=(a+b,i,))
                      p2.append(proc)
  
          for p in p2:
              p.start()
              p.join()
  </code></pre>