@affq19 I made some revisions to your code to get it to work. There are commit messages that you can look at to understand why the changes were made. I’ve also added a simple test module to test it. It can be invoked from iex like this:
c("chat.ex")
Test.run()
As has been discussed, the mutex really isn’t necessary here and implementing this using either Process.spawn/1,3 or as a GenServer is the correct way to do it. You should be able to safely remove the mutex code without it affecting anything and it might be a good first step to make the code more Elixirish.


















