On Tuesday, 11 April 2017 at 08:09:15 UTC, Martin Nowak wrote:
On Sunday, 9 April 2017 at 10:22:49 UTC, Atila Neves wrote:
I did not. Thanks for telling me!

The way I wrote it RefCounted!(shared T) works - RefCounted doesn't have to be shared itself, but I guess it could be.

I think the other design is slightly more correct, having a single thread own a shared value => RefCounted!(shared T), having multiple threads own a value (which is transitively shared) => shared(RefCounted!T).

The latter is also neede for `static shared RC!T rc;`.

Unfortunately I later remembered that because it has a destructor it can't be shared and not shared with the sample implementation. And I'd really like to avoid having to have two different names like Rust does with Rc and Arc.


Reply via email to