Created
December 1, 2012 17:21
-
-
Save shenyute/4183334 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <boost/bind.hpp> | |
#include <boost/thread.hpp> | |
class X { | |
public: | |
void run(); | |
void complexOperation( int limit ); | |
}; | |
int main() | |
{ | |
X x; | |
boost::thread thr1( boost::bind( &X::run, &x ) ); | |
boost::thread thr2( boost::bind( &X::complexOperation, &x, 30 ) ); | |
thr1.join(); | |
thr2.join(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment