Called by the driver to indicate it is busy.

        @param busy: True when busy, false when idle
        @type busy: bool
335882
def setBusy(self, busy):
        '''
        
        '''
        self._busy = busy
        if not self._busy:
            self._pump()
929911
def runAndWait(self):
        
        if self._inLoop:
            raise RuntimeError('run loop already started')
        self._inLoop = True
        self._driverLoop = True
        self.proxy.runAndWait()
1179350
def has_blocking_background_send(self):
		
		for background_object in self.background_objects:
			# If it's running, or not started yet, it should block other tasks.
			if background_object.block_other_commands and background_object.run_state in ('S','N'):
				self.shutit_obj.log('All objects are: ' + str(self),level=logging.DEBUG)
				self.shutit_obj.log('The current blocking send object is: ' + str(background_object),level=logging.DEBUG)
				return True
			elif background_object.block_other_commands and background_object.run_state in ('F','C','T'):
				assert False, shutit_util.print_debug(msg='Blocking command should have been removed, in run_state: ' + background_object.run_state)
			else:
				assert background_object.block_other_commands is False, shutit_util.print_debug()
		return False
1192325
def busy_connections(self):
        
        return [c for c in self.connections.values()
                if c.busy and not c.closed]
1363919
async def is_locked(self, resource):
        

        with await self.connect() as redis:
            lock_identifier = await redis.get(resource)
        if lock_identifier:
            return True
        else:
            return False
746284
def isConnected(self, signal, slot):
        
        sig_calls = self._callbacks.get(signal, [])
        for callback in sig_calls:
            if callback == slot:
                return True
        return False
360093
def idle_task(self):
        ''''''
        now = time.time()
        if now-self.last_bored > self.boredom_interval:
            self.last_bored = now
            message = self.boredom_message()
            self.say("%s: %s" % (self.name,message))
            # See if whatever we're connected to would like to play:
            self.master.mav.statustext_send(mavutil.mavlink.MAV_SEVERITY_NOTICE,
                                            message)
30435
def busy_disp_off(dobj):
    """"""
    dobj.kill(block=False)
    sys.stdout.write("\033[D \033[D")
    sys.stdout.flush()
482262
boolean manageIdlePool(ThreadPoolExecutor threadPool, long intervalCompleted) {

        // Manage the intervalCompleted count
        if (intervalCompleted == 0 && threadPool.getActiveCount() == 0) {
            consecutiveIdleCount++;
        } else {
            consecutiveIdleCount = 0;
        }

        if (consecutiveIdleCount >= IDLE_INTERVALS_BEFORE_PAUSE) {
            pause();
            lastAction = LastAction.PAUSE;
            return true;
        }

        return false;
    }
720177
async def wait_message(self):
        """"""
        if not self._queue.empty():
            return True
        if self._queue.closed:
            return False
        await self._queue.wait()
        return self.is_active
25756
def close(self):
        '''
        '''
        for connection in self.ready:
            connection.close()

        for connection in self.busy:
            connection.close()

        self._closed = True
700056
private boolean isReady() {
    if (this.status != Status.READY) {
      // e.g. if the node is disabled, it is not ready to run.
      return false;
    }
    for (final Node parent : this.parents) {
      if (!parent.status.isSuccessEffectively()) {
        return false;
      }
    }
    return true;
  }
587590
private boolean isQueue(DestinationType type)
    {
        boolean isQueue = false;
        if (type == DestinationType.QUEUE ||
            type == DestinationType.PORT)
            //  type == DestinationType.SERVICE)
            isQueue = true;

        return isQueue;
    }
896608
def is_running(self):
        
        return self.state in [self.STATE_IDLE, self.STATE_ACTIVE,
                              self.STATE_SLEEPING]
1096015
function () {
			if (queue.length > 0) {
				if (queue.length % 500 === 0)
					LOG.warn('socketio queue: ' + queue.length);
				
				var item = queue.shift();
				socket.busy = true;
				socket.emit('SRR', item);
			}
		}
1089358
def wait(self):
        
        if self._go:
            return True

        with self.lock:
            if self._go:
                return True
            stopper = _allocate_lock()
            stopper.acquire()
            if not self.waiting_threads:
                self.waiting_threads = [stopper]
            else:
                self.waiting_threads.append(stopper)

        DEBUG and self._name and Log.note("wait for go {{name|quote}}", name=self.name)
        stopper.acquire()
        DEBUG and self._name and Log.note("GOing! {{name|quote}}", name=self.name)
        return True
623392
@Override
  public void busy(long time)
  {
    getRequestBusyProbe().start();

    synchronized (this) {
      degrade(time);
      
      _lastBusyTime = time;
      _firstSuccessTime = 0;

      _currentFailCount++;

      _busyCountTotal++;

      _state = _state.toBusy();
    }
  }