add_queue <peer> <target> <logical-switch> <queue>
        eg. add_queue sw1 running LogicalSwitch7 NameOfNewQueue
343976
def do_add_queue(self, line):
        

        def f(p, args):
            try:
                target, lsw, queue = args
            except:
                print("argument error")
                print(args)
                return

            # get switch id
            o = p.get()
            capable_switch_id = o.id

            try:
                capable_switch = ofc.OFCapableSwitchType(
                    id=capable_switch_id,
                    resources=ofc.OFCapableSwitchResourcesType(
                        queue=[
                            ofc.OFQueueType(resource_id=queue)
                        ]
                    ),
                    logical_switches=ofc.OFCapableSwitchLogicalSwitchesType(
                        switch=[ofc.OFLogicalSwitchType(
                            id=lsw,
                            resources=ofc.OFLogicalSwitchResourcesType(
                                queue=[queue])
                        )]
                    )
                )
            except TypeError:
                print("argument error")
                return
            try:
                p.edit_config(target, capable_switch)
            except Exception as e:
                print(e)

        self._request(line, f)
952948
public void addXmitQueuePoint(SIBUuid8 meUuid,
                                PtoPMessageItemStream ptoPMessageItemStream)
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "addXmitQueuePoint", meUuid);

    if (_xmitQueuePoints != null)
    {
      synchronized(_xmitQueuePoints)
      {
        _xmitQueuePoints.put(meUuid,ptoPMessageItemStream);
      }
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "addXmitQueuePoint");
  }
1118030
def add_peer(self, peer_addr):
        ""
        peer = connection.Peer(
                self._ident, self._dispatcher, peer_addr, backend.Socket())
        peer.start()
        self._started_peers[peer_addr] = peer
89888
def add(self, requester: discord.User, track: Track):
        
        track.requester = requester
        self.queue.append(track)
744639
def queue_actions(self, source, actions, event_args=None):
		
		source.event_args = event_args
		ret = self.trigger_actions(source, actions)
		source.event_args = None
		return ret
1327104
public function add() {
		if (count($this->args) < 1) {
			$this->out('Please call like this:');
			$this->out('       bin/cake queue add <taskname>');
			$this->_displayAvailableTasks();

			return;
		}

		$name = Inflector::camelize($this->args[0]);
		if (in_array('Queue' . $name, $this->taskNames, true)) {
			/** @var \Queue\Shell\Task\QueueTask|\Queue\Shell\Task\AddInterface $task */
			$task = $this->{'Queue' . $name};
			if (!($task instanceof AddInterface)) {
				$this->abort('This task does not support adding via CLI call');
			}
			$task->add();
		} else {
			$this->out('Error: Task not found: ' . $name);
			$this->_displayAvailableTasks();
		}
	}
1201952
protected void addToPlayQueue (SoundKey skey)
    {
        boolean queued = enqueue(skey, true);
        if (queued) {
            if (_verbose.getValue()) {
                log.info("Sound request [key=" + skey.key + "].");
            }

        } else /* if (_verbose.getValue()) */ {
            log.warning("SoundManager not playing sound because too many sounds in queue " +
                        "[key=" + skey + "].");
        }
    }
1028334
public Queue<B> newQueue()
    {
        return new Queue<B>(parent_queue, queue_restriction, index, process_builder_class, process_server_class,
            default_occurence, default_visibility, default_access, default_resilience, default_output, implementation_options);
    }
958512
def prepare_queues(queues, lock):
    """"""
    for queue in queues:
        queue._pebble_lock = lock
        with queue.mutex:
            queue._pebble_old_method = queue._put
            queue._put = MethodType(new_method, queue)
1153515
function add(desc, site, fn) {
    // Create new promise to signal when this added queue job is done.
    return $q.fromNode(function(cb) {
      var siteName = site.name;
      // Add to end of promise chain.
      _hds[siteName] = _hds[siteName] || Promise.resolve();
      _hds[siteName] = _hds[siteName].then(function() {
        if (!_stopFlag) {
          // Set current job.
          _currents[siteName] = {
            title: desc,
            message: null,
            fn: fn
          };
          // Update function to update current job's message.
          var update = function(message) {
            if (_currents[siteName]) {
              _currents[siteName].message = message;
            }
          };
          // Run function.
          return $q.try(function() {
            return fn(update);
          });
        }
      })
      // Set current job back to null.
      .finally(function() {
        _currents[siteName] = null;
      })
      .then(function() {
        // Signal job is done.
        cb();
      })
      // Make sure errors get reported to the error service.
      .catch(function(err) {
        // Signal job is done with an error.
        cb(err);
        return errorService.report(err);
      });
    });
  }
1104675
def _add_pending_action(self, p_action, p_size):
        
        def generate_callback():
            def callback(*args):
                self.resolve_action(p_action, p_size)
                self.keystate = None

            return callback

        urwid.emit_signal(self, 'add_pending_action', generate_callback())
477281
def add_candidate_peer_endpoints(self, peer_endpoints):
        
        with self._lock:
            for endpoint in peer_endpoints:
                if endpoint not in self._candidate_peer_endpoints:
                    self._candidate_peer_endpoints.append(endpoint)
123179
def add_thread(self, checker, end_callback, source_code, parent):
        """"""
        parent_id = id(parent)
        thread = AnalysisThread(self, checker, source_code)
        self.end_callbacks[id(thread)] = end_callback
        self.pending_threads.append((thread, parent_id))
        logger.debug("Added thread %r to queue" % thread)
        QTimer.singleShot(50, self.update_queue)
926105
def add(self, target, *args, **kwargs):
        
        t = Thread.run(target.__name__, target, *args, **kwargs)
        self.threads.append(t)
901771
def queue(name = '', opts = {})
      queue = @connection.find_queue(name) || Queue.new(self, name, opts)
      @connection.register_queue queue
    end
1189520
private Node addWaiter(Node mode) {
        Node node = new Node(mode);

        for (;;) {
            Node oldTail = tail;
            if (oldTail != null) {
                U.putObject(node, Node.PREV, oldTail);
                if (compareAndSetTail(oldTail, node)) {
                    oldTail.next = node;
                    return node;
                }
            } else {
                initializeSyncQueue();
            }
        }
    }
76569
def _link(self, next_worker, next_is_first=False):
        """"""

        lock = multiprocessing.Lock()
        next_worker._lock_prev_input = lock
        self._lock_next_input = lock
        lock.acquire()

        lock = multiprocessing.Lock()
        next_worker._lock_prev_output = lock
        self._lock_next_output = lock
        lock.acquire()

        # If the next worker is the first one, trigger it now.
        if next_is_first:
            self._lock_next_input.release()
            self._lock_next_output.release()