併發與並行

Erlang 發明者 Joe Armstrong 在他的一篇博文(原文鏈接)中提到併發和並行的區別: Concurrent = Two queues and one coffee machine. Parallel = Two queues and two coffee machines. 併發是兩個等待隊列中的人同時去競爭一臺咖啡機,誰先競爭到咖啡機誰使用;而並行是每個隊列擁有自己的咖啡機,兩個
相關文章
相關標籤/搜索