Fearless Concurrency in Firefox Quantum
blog.rust-lang.org
Fearless Concurrency in Firefox Quantum
1–10 of 177 posts
Re: Fearless Concurrency in Firefox Quantum
#2Re: Fearless Concurrency in Firefox Quantum
#3Fearless, indeed: https://github.com/servo/servo/issues?page=1&q=thread+race
Most importantly, though, it preserves _memory safety_ in concurrent situations, so your stuff won't randomly crash, but properly panic.
It's no silver bullet, but it _is_ the "magic sauce" behind Stylo.
Re: Fearless Concurrency in Firefox Quantum
#4Fearless, indeed: https://github.com/servo/servo/issues?page=1&q=thread+race
Rust only saves you from simple races, not more complex ones. That's quite a lot already. Most importantly, though, it preserves _memory safety_ in concurrent situations, so your stuff won't randomly crash, but properly panic. It's no silver bullet, but it _is_ the "magic sauce" behind Stylo.
Re: Fearless Concurrency in Firefox Quantum
#5Fearless, indeed: https://github.com/servo/servo/issues?page=1&q=thread+race
Rust only saves you from simple races, not more complex ones. That's quite a lot already. Most importantly, though, it preserves _memory safety_ in concurrent situations, so your stuff won't randomly crash, but properly panic. It's no silver bullet, but it _is_ the "magic sauce" behind Stylo.
To my knowledge you can defeat the compile-time data race detection if you are either doing unsafe or certain scenarios with Cell/RefCell but even in that case you are guaranteed runtime detection rather than compile time detection.
These feature alone is worth its weight in gold.
Re: Fearless Concurrency in Firefox Quantum
#6Fearless, indeed: https://github.com/servo/servo/issues?page=1&q=thread+race
Somewhere on the second page I found a brief mention of a data race in rustc itself (that was fixed).
Looks pretty fearless to me!
Re: Fearless Concurrency in Firefox Quantum
#7Wow! This is great, especially considering how bad and complex (in the bad sense) C++ is. Maybe Rust and Go will finally make the Frankenstein go to sleep
Re: Fearless Concurrency in Firefox Quantum
#8"This blog post brought to you by the 'how many times can you say 'fearless concurrency' and keep a straight face' cabal.
"Seriously though, I now appreciate that term a lot more. One thing that cropped up in the review of this post was that I didn't have examples of bugs Rust prevented. Because I couldn't think of any concrete ones. Because Rust's safety doesn't work that way, it prevents your concurrency bugs before you realize you had them, by making sure you don't paint yourself into a corner. 'Fearless concurrency' really is the best way of putting this; the benefit was not that it prevented concrete bugs, but that it let us fearlessly and aggressively write code knowing that it would be concurrency bug free."
https://www.reddit.com/r/rust/comments/7cwpbq/fearless_concu...
Re: Fearless Concurrency in Firefox Quantum
#9The fearless concurrency really is ass-saving. For example, my most recent non-bug: I launched two parallel tasks where one would free a shared resource when done. In C that would be intermittent use-after-free. In Rust it was a compile-time error.
Re: Fearless Concurrency in Firefox Quantum
#10I like this explanatory comment by Manishearth, a Servo dev, in the thread over on /r/rust: "This blog post brought to you by the 'how many times can you say 'fearless concurrency' and keep a straight face' cabal. "Seriously though, I now appreciate that term a lot more. One thing that cropped up in the review of this post was that I didn't have examples of bugs Rust prevented. Because I couldn't think of any concret…
Oh and the tooling! I hope other projects take a serious example how cargo works. It's very hard to use any other build system.