title: pause a single session but keep processing other
body: <p>I want to the <code>mysql-proxy lua</code> script to handle interleaving accesses to a website (e.g. two different browser windows/users) but being able to pause/delay one of the two without influencing the other.Handling sessions interleavingly is possible in <code>mysql-proyx lua</code> (so it seems regarding the later listed output) but as soon as I start delaying the script it blocks everything and the other session cannot advance either.</p>
  
  <pre><code>-- the query which indicates the session/connection that shall be delayed at that execution
  local qoi = "SELECT loginattempts,uid FROM mybb_users WHERE username='user1' LIMIT 1"
  
  function read_query(packet)
          if string.byte(packet) == proxy.COM_QUERY then
                  query = packet:sub(2)
                  start_time = os.time()
                  if query == qoi then
                          print("busy wait")
                          while os.time() &lt; start_time + 20 do
                                  --nothing
                          end
                          print("busy wait end")
                  end
                  print("Connection id: " .. proxy.connection.server.thread_id)
          end
  end
  </code></pre>
  
  <p>However this script ends up with output:</p>
  
  <pre><code>Connection id: 36
  busy wait
  busy wait end
  Connection id: 36
  Connection id: 36
  Connection id: 36
  Connection id: 37
  Connection id: 37
  Connection id: 36
  Connection id: 36
  Connection id: 36
  Connection id: 37
  </code></pre>
  
  <p>and not the expected</p>
  
  <pre><code>Connection id: 36
  busy wait
  connection id: 37
  connection id: 37
  busy wait end
  Connection id: 36
  </code></pre>
  
  <p><strong>Is my intention even achievable and if so how?</strong></p>