Start listening to comments, using a separate thread.
9727
def _listen_comments(self):
        """"""
        # Collect comments in a queue
        comments_queue = Queue(maxsize=self._n_jobs * 4)

        threads = []  # type: List[BotQueueWorker]

        try:

            # Create n_jobs CommentsThreads
            for i in range(self._n_jobs):
                t = BotQueueWorker(name='CommentThread-t-{}'.format(i),
                                   jobs=comments_queue,
                                   target=self._process_comment)
                t.start()
                threads.append(t)

            # Iterate over all comments in the comment stream
            for comment in self._reddit.subreddit('+'.join(self._subs)).stream.comments():

                # Check for stopping
                if self._stop:
                    self._do_stop(comments_queue, threads)
                    break

                comments_queue.put(comment)

            self.log.debug('Listen comments stopped')
        except Exception as e:
            self._do_stop(comments_queue, threads)
            self.log.error('Exception while listening to comments:')
            self.log.error(str(e))
            self.log.error('Waiting for 10 minutes and trying again.')
            time.sleep(10 * 60)

            # Retry
            self._listen_comments()
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)
101951
def on_commenting(self, comment):
        """"""

        def update():
            context = self.host.cached_context
            context.data["comment"] = comment
            self.data["comment"] = comment

            # Notify subscribers of the comment
            self.comment_sync(comment)

            self.commented.emit()

        # Update local cache a little later
        util.schedule(update, 100, channel="commenting")
328478
def Start(self):
    """"""
    if not self.started:
      self.started = True
      for _ in range(self.min_threads):
        self._AddWorker()
1147473
def start(self):
        

        # Spawn the listening thread
        self.listen_thread = eventlet.spawn_n(self.listen)

        # Now do the initial load
        self.reload()
563009
def start(self):
        
        # Create the multicast socket (update the group)
        self._socket, self._group = create_multicast_socket(self._group,
                                                            self._port)

        # Start the listening thread
        self._stop_event.clear()
        self._thread = threading.Thread(
            target=self.__read,
            name="MulticastReceiver-{0}".format(self._port))
        self._thread.start()
390956
def start(self):
        """"""
        assert not self.interrupted
        for thread in self.worker_threads:
            thread.start()
        WorkerThread.start(self)
1215401
public void connectedReceived() {
        if (null != listenerReference) {
            final Listener listener = listenerReference.get();
            if (null != listener) {
                new Handler(Looper.getMainLooper()).post(new Runnable() {
                    public void run() {
                        if (isActive()) {
                            listener.onConnected(RespokeCall.this);
                        }
                    }
                });
            }
        }
    }
564646
public synchronized void resumeReceives() {
        receivesSuspended = false;if(Thread.currentThread() == channel.getIoThread()) {
            doResume();
        } else {
            channel.getIoThread().execute(new Runnable() {
                @Override
                public void run() {
                    doResume();
                }
            });
        }
    }
231574
def start(self, threaded=True):
        
        self.running = True
        if threaded:
            self._thread = Thread(target=self._run)
            self._thread.start()
        else:
            self._run()
416488
def listen(self, callback=None, timeout=(5, 300)):
        """"""
        if self._running:
            return False
        # if self.devices() is False:
        #    return False
        self._queue = Queue()
        self._running = True
        self._timeout = timeout
        self._callback_listen = callback
        threading.Thread(target=self._thread_listen, args=()).start()
        threading.Thread(target=self._thread_worker, args=()).start()
        return True
687155
public void     start()
    {
        Preconditions.checkState(Thread.currentThread().equals(ourThread), "Not in the correct thread");

        client.addParentWatcher(watcher);
    }
447425
def restart_listener(self, topics):
        '''
        '''
        if self.listener is not None:
            if self.listener.running:
                self.stop()
        self.__init__(topics=topics)
136637
public void startListening() throws FileNotFoundException, ClassNotFoundException, IOException,
        ResourceNotExistingException, TTException {
        mProcessingThread = new Thread() {
            public void run() {
                try {
                    processFileNotifications();
                } catch (InterruptedException | TTException | IOException e) {
                }
            }
        };
        mProcessingThread.start();

        initSessions();
    }
1230218
def start(self, *args, **kwargs):
    
    

    self.runArgs = args
    self.runKwargs = kwargs
    Thread.start(self)
1111448
def _run_listeners(self, line):
        
        for regex, callbacks in self.listeners.iteritems():
            match = regex.match(line)

            if not match:
                continue

            for callback in callbacks:
                callback(*match.groups())
612992
def start(self):
        """"""
        connect_thread = threading.Thread(target=self._connect)
        connect_thread.start()