def check_async(paths, options, rootdir=None):
 LOGGER.info('Async code checking is enabled.')
 path_queue = Queue.Queue()
 result_queue = Queue.Queue()
 for num in range(CPU_COUNT):
  worker = Worker(path_queue, result_queue)
  worker.setDaemon(True)
  LOGGER.info('Start worker #%s', (num + 1))
  worker.start()
 for path in paths:
  path_queue.put((path, dict(options=options, rootdir=rootdir)))
 path_queue.join()
 errors = []
 while True:
  try:
   errors += result_queue.get(False)
  except Queue.Empty:
   break
 return errors

def check_async ( paths , options , rootdir = None ) : LOGGER . info ( 'Async code checking is enabled.' ) path_queue = Queue . Queue ( ) result_queue = Queue . Queue ( ) for num in range ( CPU_COUNT ) : worker = Worker ( path_queue , result_queue ) worker . setDaemon ( True ) LOGGER . info ( 'Start worker #%s' , ( num + 1 ) ) worker . start ( ) for path in paths : path_queue . put ( ( path , dict ( options = options , rootdir = rootdir ) ) ) path_queue . join ( ) errors = [ ] while True : try : errors += result_queue . get ( False ) except Queue . Empty : break return errors
check given paths asynchronously .