Start Tasks and Retrieve Results
Learn to execute the task of sending emails and receiving confirmations in the form of notifications.
We'll cover the following...
Simple examples
To keep our project and examples simple, we won’t send real emails. However, we still need some business logic for our experiments. We use the Process.sleep/1
function to pretend to send an email. This is usually a slow operation and can take a few seconds to complete. When called with an integer, Process.sleep/1
stops the current process for the given amount of time in milliseconds. This is very handy because we can simulate code that takes a long time to complete. We can also test various edge cases, as we’ll see ...