yr.fnruntime.Consumer.receive#
- Consumer.receive(self, int timeout_ms: int, int expect_num: int = None) List[Element]#
Consumer receives data with subscription support. The call waits until either the expected number of elements expect_num is received or the timeout timeout_ms is reached.
- Parameters:
timeout_ms (int) – Timeout in milliseconds.
expect_num (int, optional) – Expected number of elements to receive.
- Raises:
RuntimeError – If receiving data fails.
- Returns:
The actual list of received elements. Data Type is List[Element].