• 4 Posts
  • 2 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle



  • First of all, thank you for this very elaborate answer. So that means OnceCell can never be used in a static but only as local variable / member variable? I see, that makes sense and also reduces its use cases by a lot of what I initially thought. But your example makes sense and the name/package also suggest it’s not thread-safe in itself, I had just wrongly assumed OnceCell was meant to be used in static contexts.

    Thanks!