To complement the article, i like this snippet from pragprog:
Here are a few heuristics to help you get started on the right foot:
Use a Task if you want to perform a one-off computation or query asynchronously.
Use an Agent if you just need a simple process to hold state.
Use a GenServer if you need a long-running server process that store states and performs work concurrently.
Use a dedicated GenServer process if you need to serialize access to a shared resource or service used by multiple concurrent processes.
Use a GenServer process if you need to schedule background work to be performed on a periodic interval.
Don't spend too much time fretting over the decision. You can start with an Agent, for example, and then migrate it to a GenServer if the process needs to do more than simply store state.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
To complement the article, i like this snippet from pragprog:
Here are a few heuristics to help you get started on the right foot:
Don't spend too much time fretting over the decision. You can start with an Agent, for example, and then migrate it to a GenServer if the process needs to do more than simply store state.