Closed ecly closed 6 years ago
Looks good, out of curiosity is a pattern to use singleton gen servers, or where do you see the benefit?
@Hanspagh Should indeed be a pattern. To avoid having to do :global.whereis_name/1
, when wanting to a call a GenServer that we know will be only be created one instance of ever. Makes the interface much easier to work with.
They for example present it in the 'Programming Elixir` book:
As we left it, our server works but is ugly to use. Our callers have to make explicit GenServer calls, and they have to know the registered name for our server process. We can do better... ... This is the pattern you should use in your servers.
Pull Request Test Coverage Report for Build 189
💛 - Coveralls