linkexe.cc 266 B

1234567891011121314151617
  1. #include<boost/thread.hpp>
  2. boost::recursive_mutex m;
  3. struct callable {
  4. void operator()() {
  5. boost::recursive_mutex::scoped_lock l(m);
  6. };
  7. };
  8. int main(int argc, char **argv) {
  9. callable x;
  10. boost::thread thr(x);
  11. thr.join();
  12. return 0;
  13. }