Returns all the messages in a thread.
555648
def get_all_messages_in_thread(self, participant_id, thread_id, check_who_read=True):
        
        try:
            messages = Message.objects.filter(thread__id=thread_id).\
                order_by('-id').\
                select_related('thread').\
                prefetch_related('thread__participation_set', 'thread__participation_set__participant')
        except Exception:
            return Message.objects.none()

        messages = self.check_who_read(messages)
        return messages
568528
def _fetch_messages(self):
        
        try:
            [_, msg] = self.socket.recv_multipart(flags=zmq.NOBLOCK)
            if Global.CONFIG_MANAGER.tracing_mode:
                Global.LOGGER.debug("fetched a new message")

            self.fetched = self.fetched + 1
            obj = pickle.loads(msg)
            self._deliver_message(obj)
            return obj
        except zmq.error.Again:
            return None
        except Exception as new_exception:
            Global.LOGGER.error(new_exception)
            raise new_exception
1122487
def QueueMessages(self, messages):
    """"""
    # Push all the messages to our input queue
    for message in messages:
      self._in_queue.put(message, block=True)
693081
def _get_active_threads_names():
        """"""
        active_threads = threading.enumerate()
        return FormattedText().join(
            [
                FormattedText().newline().normal(" - {name}").start_format().bold(name=thread.name).end_format()
                for thread in active_threads
            ]
        )
220492
private static void listAllThreads(final PrintWriter out) {
        final ThreadGroup currentThreadGroup = Thread.currentThread().getThreadGroup();
        ThreadGroup rootThreadGroup = currentThreadGroup;
        ThreadGroup parent = rootThreadGroup.getParent();

        while (parent != null) {
            rootThreadGroup = parent;
            parent = parent.getParent();
        }

        // And list it, recursively
        Util.printGroupInfo(out, rootThreadGroup, "");
    }
1230948
def messages(self):
        
        if self._messages is None:
            self._messages = MessageList(
                self._version,
                service_sid=self._solution['service_sid'],
                channel_sid=self._solution['sid'],
            )
        return self._messages
94630
private int getThreadState( Thread.State state ) {
		
		Thread[] threads = getAllThreads();
		int ct = 0;
		
		for( Thread thread : threads ) {
			if (state.equals(thread.getState()) )
				ct++;
		}
		
		return ct;
		
	}
263830
@SuppressWarnings({"unused", "WeakerAccess"})
    public ArrayList<CTInboxMessage> getAllInboxMessages(){
        ArrayList<CTInboxMessage> inboxMessageArrayList = new ArrayList<>();
        synchronized (inboxControllerLock) {
            if(ctInboxController != null){
                ArrayList<CTMessageDAO> messageDAOArrayList = ctInboxController.getMessages();
                for (CTMessageDAO messageDAO : messageDAOArrayList) {
                    Logger.v("CTMessage Dao - "+messageDAO.toJSON().toString());
                    inboxMessageArrayList.add(new CTInboxMessage(messageDAO.toJSON()));
                }
                return inboxMessageArrayList;
            }else{
                getConfigLogger().debug(getAccountId(),"Notification Inbox not initialized");
                return null;
            }
        }
    }
1325492
public List<String> getMessages() {
        if (mMessages == null || mMessages.size() == 0) {
            mMessages = Collections.singletonList(super.getMessage());
        }
        return mMessages;
    }
543049
public function threadsWithNewMessages()
    {
        return $this->threads()
            ->where(function (Builder $q) {
                $q->whereIn(Models::table('threads') . '.id', $this->unreadMessages()->pluck('thread_id'));
            })
            ->get();
    }
1187249
def incoming_messages(self) -> t.List[t.Tuple[float, bytes]]:
        
        approximate_messages = self._receive_buffer.qsize()
        messages = []
        for _ in range(approximate_messages):
            try:
                messages.append(self._receive_buffer.get_nowait())
            except queue.Empty:
                break
        return messages
1300
def get_callbacks_from_message(self, msg):
        """"""
        callbacks = []
        for key in self._find_matching_keys(msg):
            for callback in self[key]:
                callbacks.append(callback)
        return callbacks
1121302
public List<MessageItem> getAllMessagesOnStream()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getAllMessagesOnStream");
    
    List<MessageItem> returnValue = 
      new LinkedList<MessageItem>();    
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getAllMessagesOnStream", returnValue);      
    //there are no active messages on an express stream so we
    //return an empty array
    return returnValue;
  }
1243033
def messages(self):
        ''''''

        # the file contains the fixed-size file header followed by
        # fixed-size message structures. start after the file header and
        # then simply return the message structures in sequence until the
        # end of the file.

        offset = self.LENGTH
        while offset < len(self.mmap):
            yield Message(mm=self.mmap, offset=offset)
            offset += Message.LENGTH
1062222
function setMessagesRead(state, { threadID }) {
  return state.updateIn([threadID, 'messages'], messages => {
    return messages.map(msg => msg.set('isRead', true))
  })
}
139974
public Iterator<String> getMessages() {
		Iterator<SmtpMessage> it = server.getReceivedEmail();

		List<String> msgs = new ArrayList<>();
		while(it.hasNext()) {
			SmtpMessage msg = it.next();
			msgs.add(msg.toString());
		}

		return msgs.iterator();
	}
499535
public function messageThreads() : array
    {
        $returnThreads = [];

        $threads = $this->get(MessageThread::MESSAGE_THREAD_ENDPOINT . 'users/me/threadIds', [
            'withOnlineIds' => $this->onlineId()
        ]);

        if (empty($threads->threadIds)) return [];

        foreach ($threads->threadIds as $thread) {
            $returnThreads[] = new MessageThread($this->client, $thread->threadId);
        }

        return $returnThreads;
    }