2/23/2017

class member thread using std

class member function threading

1. No argument
< code start >

< code end >


2. additional arguments
< code start >

< code end >


3. Lambda Express
std::thread t( [&] { x.greeting(); } ); //no argument
std::thread t( [&] { x.greeting( "goodbye" ); } ); //with argument


Static or global function threading

< code start >

< code end >


#thread, #std, #lambda

No comments:

Post a Comment