m-m-m-m-MULTI-KILL
438974
def multi_kill threads
    UndoManager.register "killing/unkilling #{threads.size.pluralize 'threads'}" do
      threads.each do |t|
        if t.toggle_label :killed
          add_or_unhide t.first
        else
          hide_thread t
        end
      end.each do |t|
        UpdateManager.relay self, :labeled, t.first
        Index.save_thread t
      end
      regen_text
    end

    threads.each do |t|
      if t.toggle_label :killed
        hide_thread t
      else
        add_or_unhide t.first
      end
    end.each do |t|
      # send 'labeled'... this might be more specific
      UpdateManager.relay self, :labeled, t.first
      Index.save_thread t
    end

    killed, unkilled = threads.partition { |t| t.has_label? :killed }.map(&:size)
    BufferManager.flash "#{killed.pluralize 'thread'} killed, #{unkilled} unkilled"
    regen_text
  end
1071370
def mp_spawn(self):
        
        processes = []
        for x in range(self.queue_worker_amount):
            process = multiprocessing.Process(target=self.mp_worker)
            process.start()
            processes.append(process)
        for process in processes:
            process.join()
388259
def kill_clients():
    """"""
    clients = request.form.get('clients').split(',')
    kill_dead = request.args.get('kill_dead', default=False)
    kill_dead = kill_dead and kill_dead in ['true', '1']

    if not kill_dead and not clients:
        return jsonify({'Error': 'no clients provided'})

    for client in list(drivers.keys()):
        if kill_dead and not drivers[client].is_logged_in() or client in clients:
            drivers.pop(client).quit()
            try:
                timers[client].stop()
                timers[client] = None
                release_semaphore(client)
                semaphores[client] = None
            except:
                pass

    return get_active_clients()
1106184
def kill(name, signal):
    '''
    
    '''
    if not exists(name):
        raise ContainerNotExists("The container (%s) does not exist!" % name)
    cmd = ['lxc-kill', '--name=%s' % name, signal]
    subprocess.check_call(cmd)
751148
def kill_processes(self):
        
        LOGGER.critical('Max shutdown exceeded, forcibly exiting')
        processes = self.active_processes(False)
        while processes:
            for proc in self.active_processes(False):
                if int(proc.pid) != int(os.getpid()):
                    LOGGER.warning('Killing %s (%s)', proc.name, proc.pid)
                    try:
                        os.kill(int(proc.pid), signal.SIGKILL)
                    except OSError:
                        pass
                else:
                    LOGGER.warning('Cowardly refusing kill self (%s, %s)',
                                   proc.pid, os.getpid())
            time.sleep(0.5)
            processes = self.active_processes(False)

        LOGGER.info('Killed all children')
        return self.set_state(self.STATE_STOPPED)
220394
def kill(reason, memory, requests, request_time)
      if @stats
        @stats.increment("#{STATS_NAMESPACE}.killed", tags: ["reason:#{reason}"])

        @stats.histogram("#{STATS_NAMESPACE}.kill.memory", memory)
        @stats.histogram("#{STATS_NAMESPACE}.kill.total_requests", requests)
        @stats.histogram("#{STATS_NAMESPACE}.kill.total_request_time", request_time)
      end

      report_status "Killing", reason, memory, requests, request_time

      UnicornWrangler.kill_worker
    end
1353794
@Override
  public boolean onKill(Scheduler.KillTopologyRequest request) {

    // get the topology name
    String topologyName = LocalContext.topologyName(config);
    LOG.info("Command to kill topology: " + topologyName);

    // set the flag that the topology being killed
    isTopologyKilled = true;

    synchronized (processToContainer) {
      // destroy/kill the process for each container
      for (Process p : processToContainer.keySet()) {

        // get the container index for the process
        int index = processToContainer.get(p);
        LOG.info("Killing executor for container: " + index);

        // destroy the process
        p.destroy();
        LOG.info("Killed executor for container: " + index);
      }

      // clear the mapping between process and container ids
      processToContainer.clear();
    }

    return true;
  }
356429
def kill(self, nick, reason=''):
        
        with self.lock:
            self.send('KILL ' + nick + ' :' + reason, error_check=True)
168828
def attack_vectors(color = @player_turn, proposed_manifest = @piece_locations)
      enemy_color = opposing_color(color)
      kill_zone = []

      proposed_manifest.each do |piece, details|
        kill_zone << possible_moves(piece, proposed_manifest) if details.fetch(:color) == enemy_color
      end

      kill_zone.flatten.uniq
    end
1151687
def kill(self, nb = 1):
        
        self.count_lock.acquire()
        if nb > self.shared['workers']:
            nb = self.shared['workers']
        self.count_lock.release()
        for x in xrange(nb):
            self.tasks.put_nowait(WorkerExit)
382204
def kill(self, dwExitCode = 0):
        
        hThread = self.get_handle(win32.THREAD_TERMINATE)
        win32.TerminateThread(hThread, dwExitCode)

        # Ugliest hack ever, won't work if many pieces of code are injected.
        # Seriously, what was I thinking? Lame! :(
        if self.pInjectedMemory is not None:
            try:
                self.get_process().free(self.pInjectedMemory)
                self.pInjectedMemory = None
            except Exception:
##                raise           # XXX DEBUG
                pass
345267
def kill_all(signal)
      idle, running = partition_workers
      log "kill -#{signal} #{running.map { |r| r.pid }.inspect}"
      running.each { |worker| worker.kill(signal) }
    end
153014
function Player(params) {
  this.platformID = this.key = params.key;
  this.kills = params.kills;
  this.deaths = params.deaths;
  this.name = params.name;
  this.rank = params.rank;
  this.weapon = params.weapon;
}
1000039
public static void killAll()
  {
    Collection<TaskQueue> taskQueues = new ArrayList<TaskQueue>( QUEUE_MAP.values() );
    for( TaskQueue taskQueue : taskQueues )
    {
      emptyAndRemoveQueue( taskQueue.getName() );
    }
  }
597013
public void hardKill() {
    checkStarted();
    if (isRunning()) {
      if (this.processId != 0) {
        try {
          if (this.isExecuteAsUser) {
            final String cmd =
                String.format("%s %s %s -9 %d", this.executeAsUserBinary,
                    this.effectiveUser, KILL_COMMAND, this.processId);
            Runtime.getRuntime().exec(cmd);
          } else {
            final String cmd = String.format("%s -9 %d", KILL_COMMAND, this.processId);
            Runtime.getRuntime().exec(cmd);
          }
        } catch (final IOException e) {
          this.logger.error("Kill attempt failed.", e);
        }
      }
      this.process.destroy();
    }
  }
131743
def fire(obj, name, *args, **kwargs):
    
    signals = vars(obj).get('_signals', {})
    for func in signals.get(name, ()):
        func(*args, **kwargs)
840635
public void kill() {
        Util.out4.println("In Kill command");
        // call delete_device
        final int nb_class = class_list.size();
        for (int j = 0; j < nb_class; j++) {
            final Vector<?> v = ((DeviceClass) class_list.elementAt(j)).get_device_list();
            final int nb_dev = v.size();
            for (int k = 0; k < nb_dev; k++) {
                final DeviceImpl dev = (DeviceImpl) v.elementAt(k);
                if (dev.get_exported_flag() == true) {
                    try {
                        dev.delete_device();
                    } catch (final DevFailed e) {
                        e.printStackTrace();
                        // ignore error, kill the device anyway
                    }
                }
            }
        }
        //
        // Create the thread and start it
        //
        final KillThread killer = new KillThread();

        killer.start();
    }