class X
{
private:
int mX;
public:
F()
{
// some work
}
};
void thread_sample()
{
X x;
std::thread th(&X::F,&x);
th.join(); // call detach() if you want this method not to wait for F() to finish
}
Friday, July 27, 2012
Subscribe to:
Post Comments
(
Atom
)
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment