Skip to content

Commit

Permalink
refactor(iroh-docs): Replace flume with async_channel in docs (#2540)
Browse files Browse the repository at this point in the history
## Description

This is mostly a 1:1 replacement, except for the fact that the
same_channel api is missing from async_channel. So I replaced it with
some ugly code that uses the fact that a async_channel Sender or
Receiver is just an Arc<Channel>.

To be removed if/when smol-rs/async-channel#98
is merged, but until then I think it is fine.

## Breaking Changes

None

## Notes & open questions

Note: we can not use tokio::sync::mpsc::Channel for the actor because we
can't control from which thread Drop is called.
Note: some streams were Unpin before, but it was not explicit. Now I
added Unpin explicitly (and boxed the stream to make it true). Not sure
if the version check would catch this, pretty sure that not. But taking
away Unpin would have been a breaking change.

## Change checklist

- [ ] Self-review.
- [ ] Documentation updates following the [style
guide](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#appendix-a-full-conventions-text),
if relevant.
- [ ] Tests if relevant.
- [ ] All breaking changes documented.
  • Loading branch information
rklaehn authored Jul 29, 2024
1 parent c125181 commit 52de2eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 52de2eb

Please sign in to comment.