antoyo / relm

Idiomatic, GTK+-based, GUI library, inspired by Elm, written in Rust
MIT License
2.43k stars 78 forks source link

Crossbeam channels #222

Closed RadicalZephyr closed 4 years ago

RadicalZephyr commented 4 years ago

Hi, I needed to make this change for the way that I'm communicating with a Relm app from other parts of the code, specifically I need the relm::Sender to be Send which apparently the std::mpsc::Sender is not. Crossbeam channels also have better performance, so it seems like a win to me.

I also noticed that Relm itself does not depend on quote so I removed it.

antoyo commented 4 years ago

I don't want to add a new dependency.

I guess you could just implement the Channel with crossbeam in an external crate for your needs.

RadicalZephyr commented 4 years ago

Sure, that makes sense. I've done that already for my own usage. Would you be open to having the dependency be opt-in through a crate feature?

antoyo commented 4 years ago

No. I would like to simplify relm, so I don't want to have multiple implementations of the same things with optional dependencies.