Skip to content

amalthea: use crossbeam channels instead of std channels #173

Closed
@kevinushey

Description

@kevinushey

Rust's std channels have a very annoying property: the Receivers they produce are not Sync. This often implies that if you want to use a Rust std::channel within async code, you need to Arc<Mutex<>> it, even if it's not really shared across different components.

crossbeam's channels do not suffer from this limitation, and are generally regarded as better than the std equivalents. Given that Rust has even decided to import crossbeam-channel to be used instead, I think that's a strong sign that we can use them as well:

rust-lang/rust#93563

I would propose we switch from std channels to crossbeam channels and avoid using the std equivalents.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions