Where does ownership and borrowing rules shine?
Hi everyone!
Do concepts like ownership and borrowing specifically exist in Rust to prevent UB in multithreaded context? (In multithreaded env, it's quite clear: forcing the spawned thread to take ownership of a String. This prevents other threads from modifying it at the same time.)
Or it's applications shine in single threaded contexts as well? Thanks!
3 posts - 3 participants
原文:https://www.a8q9.cn/en/article/where-does-ownership-and-borrowing-rules-shine-e87dac.html