Processes a single unit from the queue.
504890
protected void processUnit (Object unit)
    {
        long start = System.nanoTime();

        // keep track of the largest queue size we've seen
        int queueSize = _evqueue.size();
        if (queueSize > _current.maxQueueSize) {
            _current.maxQueueSize = queueSize;
        }

        try {
            if (unit instanceof Runnable) {
                // if this is a runnable, it's just an executable unit that should be invoked
                ((Runnable)unit).run();

            } else {
                DEvent event = (DEvent)unit;

                // if this event is on a proxied object, forward it to the owning manager
                ProxyReference proxy = _proxies.get(event.getTargetOid());
                if (proxy != null) {
                    // rewrite the oid into the originating manager's id space
                    event.setTargetOid(proxy.origObjectId);
                    // then pass it on to the originating manager to handle
                    proxy.origManager.postEvent(event);

                } else if (event instanceof CompoundEvent) {
                    processCompoundEvent((CompoundEvent)event);

                } else {
                    processEvent(event);
                }
            }

        } catch (VirtualMachineError e) {
            handleFatalError(unit, e);

        } catch (Throwable t) {
            log.warning("Execution unit failed", "unit", unit, t);
        }

        // compute the elapsed time in microseconds
        long elapsed = (System.nanoTime() - start)/1000;

        // report excessively long units
        if (elapsed > 500000 && !(unit instanceof LongRunnable)) {
            log.warning("Long dobj unit " + StringUtil.shortClassName(unit), "unit", unit,
                        "time", (elapsed/1000) + "ms");
        }

        // periodically sample and record the time spent processing a unit
        if (UNIT_PROF_ENABLED && _eventCount % _unitProfInterval == 0) {
            String cname;
            // do some jiggery pokery to get more fine grained profiling details on certain
            // "popular" unit types
            if (unit instanceof Interval.RunBuddy) {
                cname = StringUtil.shortClassName(
                    ((Interval.RunBuddy)unit).getIntervalClassName());
            } else if (unit instanceof InvocationRequestEvent) {
                InvocationRequestEvent ire = (InvocationRequestEvent)unit;
                Class<?> c = _invmgr.getDispatcherClass(ire.getInvCode());
                cname = (c == null) ? "dobj.InvocationRequestEvent:(no longer registered)" :
                    StringUtil.shortClassName(c) + ":" + ire.getMethodId();
            } else {
                cname = StringUtil.shortClassName(unit);
            }
            UnitProfile uprof = _profiles.get(cname);
            if (uprof == null) {
                _profiles.put(cname, uprof = new UnitProfile());
            }
            uprof.record(elapsed);
        }
    }
187110
public function process ()
		{
			if (!empty( $this->_params ))
			{
				if ($this->getIsUploading())
					$this->uploadChunk();
				else
					$this->testChunk();
			}
		}
792533
public final void expurge() {
		Reference<? extends E> obj;

		final Iterator<R> iter = this.theSet.iterator();
		R reference;
		while (iter.hasNext()) {
			reference = iter.next();
			if (reference != null
					&& ((reference.isEnqueued()) || (reference.get() == null))) {
				reference.enqueue();
				reference.clear();
			}
		}
		while ((obj = this.queue.poll()) != null) {
			obj.clear();
			if (this.referenceType.isInstance(obj)) {
				this.theSet.remove(this.referenceType.cast(obj));
			}
		}
	}
265679
def process_one(self, item:ItemBase, processor:PreProcessors=None):
        ""
        if processor is not None: self.processor = processor
        self.processor = listify(self.processor)
        for p in self.processor: item = p.process_one(item)
        return item
1259511
void quickRemove(int i) {
        assert i <= size;

        queue[i] = queue[size];
        queue[size--] = null;  // Drop extra ref to prevent memory leak
    }
1328073
void freeOutput() {
        state.pool.free( output );
        output = outputs.size() > 0 ? outputs.removeLast() : null;
    }
1223988
def process_queues(self, forced=False):
        """"""

        with self.lock:
            if (not forced and not self.must_process) or not self.queues_enabled:
                return
            self.must_process = False
        ARBITRATOR.awaken()
79459
def process(self):
        
        assert self.queue is not None
        while True:
            event = self.queue.get()
            if self.pre_process_event(event):
                self.invoke_handlers(event)
            self.queue.task_done()
1244565
def process(self):
        """"""

        super(NativeBLEVirtualInterface, self).process()

        if (not self._stream_sm_running) and (not self.reports.empty()):
            self._stream_data()

        if (not self._trace_sm_running) and (not self.traces.empty()):
            self._send_trace()
1366978
def _process(self, metric):
        
        try:
            self.queue.put(metric, block=False)
        except Queue.Full:
            self._throttle_error('Queue full, check handlers for delays')
396717
@Override
  public void process() {
    if (client.isDone() || executorService.isTerminated()) {
      throw new IllegalStateException("Client is already stopped");
    }
    Runnable runner = new Runnable() {
      @Override
      public void run() {
        try {
          while (!client.isDone()) {
            String msg = messageQueue.take();
            try {
              parseMessage(msg);
            } catch (Exception e) {
              logger.warn("Exception thrown during parsing msg " + msg, e);
              onException(e);
            }
          }
        } catch (Exception e) {
          onException(e);
        }
      }
    };

    executorService.execute(runner);
  }
1182109
def final():
    """"""
    if DEBUG:
        print("Cleaning up message queues", queues)
        print("Cleaning up processes", procs)
    for q in queues:
        q.remove()
    for proc in procs:
        proc.terminate()
1365592
def finalize_processes(self):
        # type: (_MultiprocessOffload) -> None
        
        self._term_signal.value = 1
        if self._check_thread is not None:
            self._check_thread.join()
        for proc in self._procs:
            proc.join()
1253072
def remove(self, iocb):
        """"""
        if _debug: IOQueue._debug("remove %r", iocb)

        # remove the request from the queue
        for i, item in enumerate(self.queue):
            if iocb is item[1]:
                if _debug: IOQueue._debug("    - found at %d", i)
                del self.queue[i]

                # if the queue is empty, clear the event
                qlen = len(self.queue)
                if not qlen:
                    self.notempty.clear()

                # record the new length
                # self.queuesize.Record( qlen, _time() )
                break
        else:
            if _debug: IOQueue._debug("    - not found")
503678
def remove_unit(self, index):
        ''''''
        if not self.quiet:
            print "Removing", self.unit_list[index].text
        self.unit_list.pop(index)
873261
public static Single<UnitResponse> call(String group, String unit) {
        return SingleRxXian.call(group, unit, new HashMap<>());
    }
899202
public void handleSuccess ()
    {
        if (_listener instanceof InvocationService.ConfirmListener) {
            reportRequestProcessed();
        } else if (_listener instanceof InvocationService.ResultListener && _resultSet) {
            reportRequestProcessed(_result);
        }
    }