Dynamically choose between Arc or Rc

@TyOverby once prototyped a crate with a ref-counted pointer that does non-atomic operations for counting references within a thread, but also has an atomic cross-thread counter that is touched only when sharing a pointer across threads. (Conceptually it's similar to Rc<Arc<T>>, but without the double allocation.)

https://github.com/TyOverby/Bark

5 Likes