30
submitted 2 weeks ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 5 points 2 weeks ago* (last edited 2 weeks 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?"

[-] [email protected] 2 points 2 weeks ago* (last edited 2 weeks 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 ¯\_(ツ)_/¯

this post was submitted on 14 May 2025
30 points (96.9% liked)

Rust

6958 readers
15 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS