parameters: ()
docstring: Kill all running emulators that look like ones we started.
  
    There are odd 'sticky' cases where there can be no emulator process
    running but a device slot is taken.  A little bot trouble and and
    we're out of room forever.
docstring_summary: Kill all running emulators that look like ones we started.
docstring_tokens: Kill all running emulators that look like ones we started .
function: def _KillAllEmulators():
    """Kill all running emulators that look like ones we started.
  
    There are odd 'sticky' cases where there can be no emulator process
    running but a device slot is taken.  A little bot trouble and and
    we're out of room forever.
    """
    emulators = android_commands.GetAttachedDevices(hardware=False)
    if not emulators:
      return
    for emu_name in emulators:
      cmd_helper.RunCmd(['adb', '-s', emu_name, 'emu', 'kill'])
    logging.info('Emulator killing is async; give a few seconds for all to die.')
    for i in range(5):
      if not android_commands.GetAttachedDevices(hardware=False):
        return
      time.sleep(1)
function_tokens: def _KillAllEmulators ( ) : emulators = android_commands . GetAttachedDevices ( hardware = False ) if not emulators : return for emu_name in emulators : cmd_helper . RunCmd ( [ 'adb' , '-s' , emu_name , 'emu' , 'kill' ] ) logging . info ( 'Emulator killing is async; give a few seconds for all to die.' ) for i in range ( 5 ) : if not android_commands . GetAttachedDevices ( hardware = False ) : return time . sleep ( 1 )