The problem I have with solution 1 is that I don't know how to get 2 threads to talk to each other.
If the "threads" in question are these threads, then have you not encountered threads::shared?
If not, you'll need to specify/clarify your meaning of "threads".
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.