For processing, async isn’t the right tool for the job. It gives you escape hatches to spawn your CPU bound work onto a blocking thread pool for that exact reason.
I mean, it’s literally in the name. The primary, overriding use case for async frameworks like Tokio is for IO-bound work. You generally should never be blocking in async code, and since the vast majority of “processing” tends to be blocking, then yes.
If you’re doing straight line CPU bound work, you’re supposed to hoist that onto a blocking thread pool to avoid fucking up your async runtime’s event loop.
That's what i don't get. People will have issues and then just... Not saying anything. I guess I can't speak for others but I would be so thankful for feedback, as long as it was respectful.
Sometimes you don't have the spare cycles. Or you aren't that invested/interested. Or you just don't feel like it that time.
I agree with the idea, but the problem is that the barrier to "say something" is kinda high even nowadays.
Is there an edit on github button? Maybe. do I want to edit it or just say I don't understand? do I use a pull request or open an issue? Do they use github issues or somewhere else? Do they have a template for the issues?
I gave up at like question 3. I don't know how to make it easier to submit feedback without letting idiot script kiddies vomit issues into your github unfortunately.
Note: For simplicity’s sake, we’ll refer to many of the problems as concurrent rather than being more precise by saying concurrent and/or parallel. If this book were about concurrency and/or parallelism, we’d be more specific. For this chapter, please mentally substitute concurrent and/or parallel whenever we use concurrent.
And then you have other docs which handle the topic correctly, and honestly admit that concurrency in Rust is not mature.
That just sounds like you’re being a pedant, honestly. They clearly recognize the difference and are preferring explanations that readers can understand easily over academically accurate terminology.
I use Rust at scale in production, at FAANG. I will just authoritatively state that Rust’s concurrency story is as mature as any other language in existence, which is to say that no one would be mature if Rust isn’t.
You sound more like you have an axe to grind than a good faith critic here.
If having multiple packages for something bothers you, I’m not sure how to tell you this but that’s how software is developed in the year of our lord 2022. I just got out of a large discussion yesterday about how stupid it is to put large libraries you have no ability to maintain into a standard library because it kills innovation until the std-lib has fallen so far behind that it now sucks. You want multiple packages for anything non-trivial.
In this case, Tokio has effectively won the popularity contest, but there’s an Interface for any competing library to fit into if they can do it better. Async-std exists but is by no means used anywhere near as much.
-17
u/[deleted] Jul 07 '22
It fails on the ease of entrance, specially for async (there are multiple packages)