So I have a type
RcTree, which behind the screens uses an
Rc<T> which means it’s not shareable between threads. I want to initialize an
RcTree value on first use, then reuse the same value, and maybe clone new references to it within one thread.
Because the type is not sharable between threads, it looks like using
lazy_static is off the table. And because it’s a rather complex type, I can’t put it in a top-level
Is there any other way I can init the value only once rather than pay the allocation and initialization costs on every use?