C++: Please read directions. Files, Vectors, LINQ & Threads Using your contacts code from the…
C++: Please read directions.
Files, Vectors, LINQ & Threads Using your contacts code from the previous assignment, we will now turn contacts into a multithreaded application. The output of my single-threaded contacts project after performing its tasks sequentially looks like this: Loading contacts Please wait… File Finished We loaded 1000001 contacts into memory we found 20904 contacts where las nane begins with St. We found 10824 contacts where last nane begins with 2. We found 163423 contacts who live in CA Ne found 142676 contacts who use AOL as emai1 We found 128 contacts wiヒh first name sta ting in Ba and last name staring in F We found 69 contacts with first name atarting with T and last name staring in F who live in MI Original list sorted by state.. . original list sorted by state and city Original list sorted by state, city, and zip… ain end After I modified my program to run each task in a new background thread, the output now looks like this: Loading contacts. Please wait… File Finished We loaded 1000001 contacts into memory St rting thr#ads. We found 128 contacts wiㄷh first name starting in Ba and last name staring in F we found 69 contact= with first name starting with T 쀼nd la t name staring in F who live in MI We found 10824 contacts where last nane begins with 2 We found 20904 contacts where las nare begins with St. o found 163423 contacts who 1ive in CA We found 142676 contacts who use AOL as email. Original list sorted by state… Original list sorted by state and elty Original list sorted by state, city, and zip.. Main end Notice how the order of completion is now very different. This is because each task now runs independently on a different thread. We cannot know exactly which tasks will finish first- or the exact order in which tasks will ultimately produce results.