def main ():
  requests = Queue.Queue ()
  results = Queue.Queue ()
  for i in range (20):
    t = threading.Thread (target=get_object_info, args=(requests, results))
    t.setDaemon (True)
    t.start ()

  public_object_type_information = PUBLIC_OBJECT_TYPE_INFORMATION ()
  object_name_information = OBJECT_NAME_INFORMATION ()
  this_pid = os.getpid ()

  for pid, handle in get_handles ():
    if pid == this_pid:
      continue
    hDuplicate = get_process_handle (pid, handle)
    if hDuplicate is None:
      continue
    else:
      requests.put ((pid, int (hDuplicate)))

  while True:
    try:
      yield results.get (True, 2)
    except Queue.Empty:
      break
dataset/ETHPy150Open tjguk/winsys/random/file_handles.py/main/original