title: Gevent,http/cgi non blocking server
body: <p>I have this methods:</p>
  
  <pre><code>class dJobs():
      def server(self):
          address = ('127.0.0.1', dConfig.cgiport)
          handler = CGIHTTPServer.CGIHTTPRequestHandler
          handler.cgi_directories = ['/cgi-bin']
          self.logger.info("starting http server on port %s" %str(port))
          httpd = BaseHTTPServer.HTTPServer(address, handler)
          httpd.serve_forever()
  
      def job(self):
          self.runNumber = 0
          while True:
              self.logger.info("Counting: %s" %str(self.runNumber))
              self.runNumber+=1
              time.sleep(1)
  </code></pre>
  
  <p>I want run job while waiting for http and cgi requests, handle requests and then continue job method.
  Is it possibile to do this using gevent (and how), or i need to use threading ?</p>
  
  <p>i.e. I want to run both method concurrently without creating threads.</p>