Processes / Concurrency
Last updated
Last updated
As easy as spawn
to runs code specified at undefined time each with a process_id
Only communication is messages between processes
Supervisors often linked to processes and will restart on failure
- Simple wrappers around genserver for state.
- “Generic servers” (processes) that encapsulate state, provide sync and async calls, support code reloading, and more. For ongoing background work
- Asynchronous units of computation that allow spawning a process and potentially retrieving its result at a later time.
DynamicSupervisors - Allow you to dynamically create and restart/supervise agents/genservers like if you need to spin one up per user or event
- Allow strings to map to processes(instead of just atoms)
messages are only one way, so if want response need to recieve
Messages will be put in process mailbox for future use
Look at livedashboard or erlang observer or