b56ad188a13d368db924e3f8f10c88240fb83011
[platform/upstream/libzypp.git] / devel / devel.ma / AOUT.cc
1 #include <iostream>
2 #include "zypp/base/Logger.h"
3 #include "zypp/base/LogTools.h"
4 #include "zypp/base/Function.h"
5 #include "zypp/base/IOStream.h"
6 #include "zypp/base/InputStream.h"
7 #include "zypp/ProgressData.h"
8
9 #include "zypp/base/Random.h"
10
11 #include <boost/thread.hpp>
12
13 using std::endl;
14 using namespace zypp;
15
16
17 void action( int i_r )
18 {
19   unsigned sec = base::random( 3 );
20   sleep( sec );
21   MIL << "Action " << i_r << " (" << sec << ")" << endl;
22 }
23
24
25 int main( int argc, char * argv[] )
26 {
27   INT << "===[START]==========================================" << endl;
28
29   for ( unsigned i = 0; i < 5; ++i )
30   {
31     new boost::thread( bind( action, i ) );
32   }
33
34   INT << "===[END]============================================" << endl << endl;
35   return ( 0 );
36 }