Dining Philosophers in Erlang
问题 If you have ever seen Dining Philosophers before, then you know that there are a few ways to do it. My implementation creates philosopher and fork processes which communicate with message passing. I was having a lot of program with format on the fork and philosopher processes, but I figured it out myself and now I will share the finished code. I'm a beginner fyi. Have a nice day. -module(df). -export([start/0, fork/2, philosopher/5]). start() -> SpawnForks = spawnForks([1,2,3,4], []),