mirror of
https://github.com/boostorg/thread.git
synced 2026-01-20 17:12:13 +00:00
15 lines
313 B
C++
15 lines
313 B
C++
#include <boost/thread/thread.hpp>
|
|
#include <iostream>
|
|
|
|
struct helloworld
|
|
{
|
|
helloworld(const char* who) : m_who(who) { }
|
|
void operator()() { std::cout << m_who << "says, \"Hello World.\"" << std::endl; }
|
|
const char* m_who;
|
|
};
|
|
|
|
int main()
|
|
{
|
|
boost::thread thrd(helloworld("Bob"));
|
|
thrd.join();
|
|
} |