Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
一个论坛帖子指出使用唯一性类型而不是 STM。我不明白它在说什么。例如,唯一性类型如何处理 STM 试图处理的多个线程正在更新同一变量的问题?
我查看了维基百科关于唯一性类型和线性类型的文章,但仍然不清楚论坛帖子的含义。
设计由多个线程同时共享和更改数据的系统是很困难的。
使并发更容易的方法包括: