• @[email protected]
    link
    fedilink
    English
    6
    edit-2
    3 months ago

    Yep. One reason why those situations become less frequent over time is that one learns to avoid such designs. Thought process: “Sharing data across threads is annoying. So I’d rather avoid it. Maybe message passing can solve the same problem as well?”

    • trevor (he/they)
      link
      fedilink
      English
      2
      edit-2
      3 months ago

      I just use Arc::clone() now that I know I can just throw the problematic data types on the heap easily. I’m sure there are “better” ways to do it, but ¯\_(ツ)_/¯