mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-05 14:35:20 -04:00
The `SyncService::stop()` method could fail for the following reasons: 1. The supervisor was not properly started up, this is a programmer error. 2. The supervisor task wouldn't shut down and instead it returns a JoinError. 3. We couldn't notify the supervisor task that it should shutdown due the channel being closed. All of those cases shouldn't ever happen and the supervisor task will be stopped in all of them. 1. Since there is no supervisor to be stopped, we can safely just log an error, our tests ensure that a `SyncService::start()` does create a supervisor. 2. A JoinError can be returned if the task has been cancelled or if the supervisor task has panicked. Since we never cancel the task, nor have any panics in the supervisor task, we can assume that this won't happen. 3. The supervisor task holds on to a reference to the receiving end of the channel, as long as the task is alive the channel can not be closed. In conclusion, it doesn't seem to be useful to forward these error cases to the user.
Experiments
This directory contains experiments, work-in-progress crates, or other code and documentation, that
do not fall under the same stability guarantees as the main crates (matrix-sdk,
matrix-sdk-crypto, etc.).
Lab projects might be abandoned and possibly removed at any time.
That said, this directory is meant to freely explore unconventional or interesting ways the Matrix Rust SDK can evolve, feel free to propose an experiment.
Current experiments
- multiverse: a TUI client mostly for quick development iteration of SDK features and debugging.
Run with
cargo run --bin multiverse matrix.org ~/.cache/multiverse-cache.
Archived experiments
Link to PR that deleted the experiment from the repo, newest first: