News for hackers. Stuff that matters.
Re:Rust 0.9 released by banachtarski on Thursday January 09, 2014 @10:51PM (#7035002)
I actually make it a point to do most of my code without shared_ptr, opting instead for unique_ptr. There was a talk somewhere about the "best written library you should never use" and shared_ptr was the focus.

For the example you mentioned, you could have the parent object of those tasks responsible for cleanup of the shared object (e.g. each thread's destructor calls a finish function on the parent object). This is just one possible implementation. I don't encounter this as much because I prefer a shared-nothing approach where possible.

edit:typo

There are no comments on this comment yet.