Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions can/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ def on_message_received(self, msg: Message) -> None:

def get_message(self, timeout: float = 0.5) -> Optional[Message]:
"""
Attempts to retrieve the latest message received by the instance. If no message is
available it blocks for given timeout or until a message is received, or else
returns None (whichever is shorter). This method does not block after
:meth:`can.BufferedReader.stop` has been called.
Attempts to retrieve the message that has been in the queue for the longest amount
of time (FIFO). If no message is available, it blocks for given timeout or until a
message is received (whichever is shorter), or else returns None. This method does
not block after :meth:`can.BufferedReader.stop` has been called.

:param timeout: The number of seconds to wait for a new message.
:return: the Message if there is one, or None if there is not.
:return: the received :class:`can.Message` or `None`, if the queue is empty.
"""
try:
if self.is_stopped:
Expand Down