title: Sharing a global variable between Lua lanes
body: <p>I wanted to share a global variable between 2 lanes,the idea is that when lane1 updates a shared variable,i should be able to get it's updated value on lane2 when it gets scheduled. Is there a solution to this?</p>
  
  <p>Code Snippet below :-</p>
  
  <pre><code>shared_variable = 0
  local function lane1()
      ..
      shared_variable = shared_variable + 1
  end
  
  local function lane2()
      ..
      print(shared_variable)--&gt;shared variable is not getting updated,always prints 0
  end
  
  Thread1= lanes.gen("*",{globals = _G},lane1)
  Thread2= lanes.gen("*",{globals = _G},lane2)
  
  T1 = Thread1()
  T2 = Thread2()
  
  T1:join()
  T2:join()
  </code></pre>