mercredi 27 mars 2019

What is a good way to do inter-thread communication in c++11

So there seems to be a fairly basic thing that I don't understand about multithreading and that is how threads would communicate, and most importantly send data between each other.

For example, say you have 5 tcp connections on 5 different threads, every connection would then send a number to the server and the server would send back all those 5 numbers added together. How would one in normal c++11 communicate those numbers between the threads?

Aucun commentaire:

Enregistrer un commentaire