4 ms·
What's the problem with Send bounds? So you use Arc instead of Rc.
by veber-alex 3y ago
What's the problem with Send bounds? So you use Arc instead of Rc.
- masklinn 3y agoThe main problem is that for a future to be send, everything held across an await point has to be Send. Which is quite constraining and annoying, especially because this often does not play well with trait objects or `impl Trait` as people will commonly not think to add trait extra trait bounds. And of course it's an accumulation of trait bounds on everything, which makes for a downgrade in readability.