advance/concurrency-with-threads/concurrency-parallelism #762
Replies: 8 comments 7 replies
-
并行一定是并发,反之并发只有在多核时才可能并行。 |
Beta Was this translation helpful? Give feedback.
-
为什么不讲Rust多进程呢? |
Beta Was this translation helpful? Give feedback.
-
“如果你愿意牺牲一些性能来换取更精确的线程控制以及更小的线程上下文切换成本” |
Beta Was this translation helpful? Give feedback.
-
我个人更喜欢Erlang之父对于 单线程 => 一个咖啡机, 有多于两个队伍的人都需要使用这一个咖啡机接咖啡, 调度员只在一个队伍的人接到咖啡之后, 才允许下一个队伍使用这台咖啡机 单线程并发 => 仍然只有一个咖啡机, 队伍数量不变, 调度员这次取消了一个队伍的人全部接完咖啡后才能切换队伍的限制, 允许这次A队的人接, 下次B队的人接, 使得总体上队伍之间的进展比较协调 并行 => 这次, 不再只有一个咖啡机了 1:1 并行 => 有几个队伍, 就有几个咖啡机, 队伍之间互不干扰 M:N 并行 => M个队伍, N个咖啡机 ( |
Beta Was this translation helpful? Give feedback.
-
搞不懂并发为啥要用同时? |
Beta Was this translation helpful? Give feedback.
-
JavaScript 带个 nodejs 大运行时,属于哪种线程模型呢 |
Beta Was this translation helpful? Give feedback.
-
并发系统强调支持多个任务,不一定是同时处理,也许会排队。并行处理就是字面意思,同时处理多个任务。 |
Beta Was this translation helpful? Give feedback.
-
最后如果join了,并且join调用时变量还在生命周期内,外部环境的变量应该是能借用给线程的。也许Rust开发团队是觉得这种判断会让编译器的实现过于复杂吧。 |
Beta Was this translation helpful? Give feedback.
-
advance/concurrency-with-threads/concurrency-parallelism
https://course.rs/advance/concurrency-with-threads/concurrency-parallelism.html
Beta Was this translation helpful? Give feedback.
All reactions