5 #include <boost/date_time.hpp>
6 #include <boost/thread.hpp>
11 using boost::posix_time::seconds
;
12 using boost::this_thread::sleep
;
14 /*----------------------------------------------------------------------*\
16 \*---------------------------------------------------------------------*/
18 /*--------------------------------------*\
20 \*-------------------------------------*/
26 Runnable(int a
, int b
)
36 virtual ~Runnable(void)
46 cout
<< "runnable : foncteur : start" << endl
;
48 cout
<< "runnable : foncteur : end" << endl
;
53 cout
<< "runnable : methode : start" << endl
;
55 cout
<< "runnable : methode : end" << endl
;
66 * common to work and operator()
72 cout
<< "[inside thread] : " << a
<< " + " << b
<< " = " << result
<< endl
;
73 // Pretend to do something useful...
89 /*----------------------------------------------------------------------*\
91 \*---------------------------------------------------------------------*/