title: Working with Greenlet values
body: <p>I would like to implement an async work into one of my testing functions.
  The function, <strong>heuristically</strong>, looks like this - </p>
  
  <pre><code>def test_sessions(self):
      sessions = []
      """
      Creating 10k session instances
      """
      for i in xrange(10000):
          sessions.append(Session.create_session(session_handle, login_params(user, pass))
      """
      Foreach session instance, check session validity by running read_dir command
      """
      for session in sessions:
          connection = Connection.create_connection(addrs, port)
          connection.session = session.id
          response = connection.read_dir(dir)
      """
      Deleting the 10k opened sessions
      """
      for session in sessions:
          session.delete(session_handle)
  </code></pre>
  
  <p>The time that takes to perform this check for 10k sessions is around 30m. Hence, I though to use greenlet and gevent for these sections (create, check and delete) in order to speed things up a bit.</p>
  
  <p>I'm having some trouble understanding how to implement this idea since I couldn't figure how to access the session instances that will be created by the greenlet threads.. I couldn't find any good example of how to be able to use the greenlet values.</p>
  
  <p>Please direct me to the right way of using greenlet here </p>