eclipse-uprotocol / eclipse-uprotocol/up-rust
UTransport::receive should support specifying max-time-to-wait
Open
- Dominant language
- Rust
- Stars
- 26
- Forks
- 18
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 6
Description
It is unclear how the `UTransport::receive` function handles situations where no message is (immediately) available on the given topic, i.e. when will the returned future be completed?
```rust
async fn receive(&self, topic: UUri) -> Result;
```
FMPOV the function should accept an argument indicating for how long the client wants to wait, e.g. `0` = fail immediately if no message is available, and `t > 0` = fail after t milliseconds without a being message available:
```rust
async fn receive(&self, topic: UUri, timeout: u16) -> Result;
```
Contributor guide
Assessment
This issue has not been assessed yet.