News for hackers. Stuff that matters.
Re:Fearless concurrency with Rust by rationalthug on Friday April 10, 2015 @02:14PM (#9356099)
On a somewhat interesting note: transferable objects work similarly in web workers. There have been complaints, of course, that this makes it impossible to take advantage of shared memory in cases where it provides clear performance benefits.
Re:Fearless concurrency with Rust by shortstuffsushi on Friday April 10, 2015 @03:34PM (#9356620)
Wouldn't the concept of borrowing avoid that issue in Rust though?
Re:Fearless concurrency with Rust by pcwalton on Friday April 10, 2015 @03:46PM (#9356691)
Actually, atomics and locks (which are fully supported) are what avoid that issue in Rust. You can't borrow across multiple threads.
Re:Fearless concurrency with Rust by Jweb_Guru on Friday April 10, 2015 @03:58PM (#9356772)
You can now with scoped threads, provided that you don't require mutation.
Re:Fearless concurrency with Rust by FreeFull on Sunday April 12, 2015 @08:19AM (#9363088)
Actually, it's possible to share a &mut into a scoped threat too, and perform mutation through it. It's safe because the &mut only ever exists in one place at a time.