eclipse-uprotocol / eclipse-uprotocol/up-rust

UTransport::receive should support specifying max-time-to-wait

Open
#45 4 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.