News for hackers. Stuff that matters.
Re:Async Rust doesn't have to be hard by xxpor on Friday June 03, 2022 @08:43PM (#31615644)
To a certain extent, it's just enforcing what you have to do for correctness. If you have concurrency (even without parallelism), and objects are shared across contexts, you have to keep track of when objects are in use or not. The other option is enforcing exclusive access (which is just a way of maintaining a refcount of 1)

At least Rust makes it easier with an Rc/Arc type! Can't tell you how many refcounting bugs I've dealt with in C since you have to remember to increment and decrement the count manually.

There are no comments on this comment yet.