Place the IM in monitoring mode.
480557
async def monitor_mode(self, poll_devices=False, device=None,
                           workdir=None):
        """"""
        print("Running monitor mode")
        await self.connect(poll_devices, device, workdir)
        self.plm.monitor_mode()
499187
public synchronized final void pause() {
        if (isStop) return ;

        isPause = true;
        mPauseTimeInFuture = mStopTimeInFuture - SystemClock.elapsedRealtime();
        mHandler.removeMessages(MSG);
    }
471338
def active_io(self, iocb):
        """"""
        if _debug: IOQController._debug("active_io %r", iocb)

        # base class work first, setting iocb state and timer data
        IOController.active_io(self, iocb)

        # change our state
        self.state = CTRL_ACTIVE
        _statelog.debug("%s %s %s" % (_strftime(), self.name, "active"))

        # keep track of the iocb
        self.active_iocb = iocb
1135380
public void startWatching() {
        try {
            final List<MonitorLine> lines = getSource().getLastLine(getInitialCount());
            actual = null;
            updateLines(lines);
        } catch (Exception e) {
            notifyObservers(e);
        }
    }
40211
private void startFolderMonitor() {
    if (serverConfiguration.getAppFolderToMonitor() != null) {
      try {
        folderMonitor = new FolderMonitor(this, serverConfiguration);
        folderMonitor.start();
      } catch (IOException e) {
        log.warning("Could not monitor the given folder: "
            + serverConfiguration.getAppFolderToMonitor());
      }
    }
  }
1247733
def notify(self, msgtype, method, params):
        """"""
        self.dispatch.call(method, params)
117170
def execute(self):
        """"""
        try:
            logging.debug("Entering IOLoop")
            self.loop.start()
            logging.debug("Leaving IOLoop")
        except KeyboardInterrupt:
            logging.debug("Leaving IOLoop by KeyboardInterrupt")
        finally:
            self.hw_communication.disconnect()
51361
def watch(cams, path=None, delay=10):
    """"""
    while True:
        for c in cams:
            c.snap(path)
        time.sleep(delay)
1185539
public void monitorEnter(Local<?> monitor) {
        addInstruction(new ThrowingInsn(Rops.MONITOR_ENTER, sourcePosition,
                RegisterSpecList.make(monitor.spec()), catches));
    }
1702
def on(self):
        """"""
        on_command = ExtendedSend(self._address,
                                  COMMAND_LIGHT_ON_0X11_NONE,
                                  self._udata,
                                  cmd2=0xff)
        on_command.set_checksum()
        self._send_method(on_command, self._on_message_received)
986678
def mt_interact(self):
        """"""
        import _thread
        _thread.start_new_thread(self.listener, ())
        while 1:
            line = sys.stdin.readline()
            if not line:
                break
            self.write(line)
846488
def _on_open(self, _):
        """"""
        nick = self._format_nick(self._nick, self._pwd)
        data = {"cmd": "join", "channel": self._channel, "nick": nick}
        self._send_packet(data)
        self._thread = True
        threading.Thread(target=self._ping).start()
145028
def do_mode(self, target, msg, nick, send):
        """"""
        mode_changes = irc.modes.parse_channel_modes(msg)
        with self.data_lock:
            for change in mode_changes:
                if change[1] == 'v':
                    self.voiced[target][change[2]] = True if change[0] == '+' else False
                if change[1] == 'o':
                    self.opers[target][change[2]] = True if change[0] == '+' else False
        # reop
        # FIXME: handle -o+o msbobBot msbobBot
        if [x for x in mode_changes if self.check_mode(x)]:
            send("%s: :(" % nick, target=target)
            # Assume bot admins know what they're doing.
            if not self.is_admin(None, nick):
                send("OP %s" % target, target='ChanServ')
                send("UNBAN %s" % target, target='ChanServ')

        if len(self.guarded) > 0:
            # if user is guarded and quieted, devoiced, or deopped, fix that
            regex = r"(.*(-v|-o|\+q|\+b)[^ ]*) (%s)" % "|".join(self.guarded)
            match = re.search(regex, msg)
            if match and nick not in [match.group(3), self.connection.real_nickname]:
                modestring = "+voe-qb %s" % (" ".join([match.group(3)] * 5))
                self.connection.mode(target, modestring)
                send('Mode %s on %s by the guard system' % (modestring, target), target=self.config['core']['ctrlchan'])
967662
def _on_receive(self, msg):
        
        _vv and IOLOG.debug('%r._on_receive(%r)', self, msg)
        self._latch.put(msg)
        if self.notify:
            self.notify(self)
1074975
def watch(self):
        """"""
        return bool(lib.EnvGetDefmessageHandlerWatch(
            self._env, self._cls, self._idx))
787791
def on_connect(client):
    """"""
    client.nick(client.user.nick)
    client.userinfo(client.user.username, client.user.realname)
738143
def handle_notification(self, data):
        """"""
        _LOGGER.debug("Received notification from the device..")

        if data[0] == PROP_INFO_RETURN and data[1] == 1:
            _LOGGER.debug("Got status: %s" % codecs.encode(data, 'hex'))
            status = Status.parse(data)
            _LOGGER.debug("Parsed status: %s", status)

            self._raw_mode = status.mode
            self._valve_state = status.valve
            self._target_temperature = status.target_temp

            if status.mode.BOOST:
                self._mode = Mode.Boost
            elif status.mode.AWAY:
                self._mode = Mode.Away
                self._away_end = status.away
            elif status.mode.MANUAL:
                if status.target_temp == EQ3BT_OFF_TEMP:
                    self._mode = Mode.Closed
                elif status.target_temp == EQ3BT_ON_TEMP:
                    self._mode = Mode.Open
                else:
                    self._mode = Mode.Manual
            else:
                self._mode = Mode.Auto

            _LOGGER.debug("Valve state: %s", self._valve_state)
            _LOGGER.debug("Mode:        %s", self.mode_readable)
            _LOGGER.debug("Target temp: %s", self._target_temperature)
            _LOGGER.debug("Away end:    %s", self._away_end)

        elif data[0] == PROP_SCHEDULE_RETURN:
            parsed = self.parse_schedule(data)
            self._schedule[parsed.day] = parsed

        else:
            _LOGGER.debug("Unknown notification %s (%s)", data[0], codecs.encode(data, 'hex'))