Threads examples using c++11