A Bigger Example
Understand the implementation of both tasks and agents through an example.
We'll cover the following...
We'll cover the following...
Rewriting our anagram code
Let’s rewrite our anagram code to use both tasks and an agent.
We’ll load words in parallel from a number of separate dictionaries. A separate task handles each dictionary. We’ll use an agent to store the resulting list of words and signatures.
Our four wordlist files contain the following:
list1 |
list2 |
list3 |
list4 |
|---|---|---|---|
angor |
ester |
palet |
rogan |
argon |
estre |
patel |
ronga |
caret |