Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jleang
· 7y ago · 0 comments
hmm, its better to store state in ETS so when it does crash it can be restarted by the supervisor without losing the state.
Comments
[–]
filmor
7y ago
This depends highly on what you are storing. Letting a process reuse "old" state after a crash can easily cause a restart loop.
[–]
akashakya
7y ago
That depends on the usecase. Sometimes you do want to start with clean state. If the process is in some invalid state which caused the crash in the first place, restarting the process is useless in this case