3 ms·
I'm fond of rust, but compared to go, I dislike that you need a different code path to support sync vs async in a module. Or pick a different runtime like Toki
by sliken 3y ago
I'm fond of rust, but compared to go, I dislike that you need a different code path to support sync vs async in a module. Or pick a different runtime like Tokio. So you end up with modules that are async only, sync only, or both.
Makes me miss go, which has channels build in, has a runtime built in, and both are generally solid. None of use flavor A for this, use flavor B for that, or write wrappers for the wrong color function.
- iknowstuff 3y agoRust has channels built in. In fact, the std channels were recently rebuilt on top of the excellent crossbeam crate. Function colors is kind of a meme but maybe-async functions are coming. https://lib.rs/tokio https://lib.rs/tokio is king for std environments, https://lib.rs/embassy https://lib.rs/embassy for no_std.
- sliken 3y agoYes, MPSC, single consumer which is limiting.
- iknowstuff 3y agoOh. cargo add crossbeam-channel