Concurrency/2.Data_between_Threads/Promises_Futures/example_1.cpp
void printMessage(std::string message)
{
    std::this_thread::sleep_for(std::chrono::milliseconds(10)); // simulate work
    std::cout << "Thread 1: " << message << std::endl;
}
/*
A drawback of these two approaches is that the information flows 
from the parent thread (main) to the worker threads (t1 and t2).
*/
A drawback of these two approaches is that the information flows
from the parent thread (main) to the worker threads (t1 and t2).
A drawback of these two approaches is that the information flows from the parent thread ( main ) to the worker threads ( t1 and t2 ) .
void printMessage(std::string message)
{
    std::this_thread::sleep_for(std::chrono::milliseconds(10)); 
    std::cout << "Thread 1: " << message << std::endl;
}
void printMessage ( std :: string message ) { std :: this_thread :: sleep_for ( std :: chrono :: milliseconds ( 10 ) ) ; std :: cout << " " << message << std :: endl ; }
A drawback of these two approaches is that the information flows
from the parent thread (main) to the worker threads (t1 and t2).
A drawback of these two approaches is that the information flows from the parent thread ( main ) to the worker threads ( t1 and t2 ) .
// simulate work