Tasks
Extends spawn to provide better error & introspection
Meant to execute on task with little communication, like turning seq code into async to compute values/send requests
Methods Overview
Task.start/1
Task.start_link/1
Task.async/1
- expects reply that is always sent (will crash if caller crashes)Task.await/1
Sequential => Concurrent Code
Adhoc Tasks
Can easily run without a supervisor for unessential tasks like emails
Async requests
Task Supervisor
Summary:
Setup
Application.ex
Somewhere in app
account_setup.ex
Tasks will be run with when that ft
Your CRM sample
Last updated