]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MONITOR/alistoragemanager/alistorage.cxx
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[u/mrichter/AliRoot.git] / MONITOR / alistoragemanager / alistorage.cxx
1 #include "AliStorageClientThread.h"
2 #include "AliStorageServerThread.h"
3
4 #include <TThread.h>
5 #include <iostream>
6
7 using namespace std;
8
9 void *ClientThreadHandle(void*)
10 {
11         cout<<"ALICE Storage Manager -- Starting client thread"<<endl;
12         AliStorageClientThread *client = new AliStorageClientThread();
13         if(client){delete client;}
14         return 0;
15 }
16
17 void *ServerThreadHandle(void*)
18 {
19         cout<<"\nALICE Storage Manager -- Starting server thread"<<endl;
20         AliStorageServerThread *server = new AliStorageServerThread();
21         if(server){delete server;}
22         return 0;
23 }
24
25 int main()
26 {
27         TThread *clientThread = new TThread("clientThread", ClientThreadHandle,NULL);
28         TThread *serverThread = new TThread("serverThread", ServerThreadHandle,NULL);
29     
30         clientThread->Run();
31         serverThread->Run();
32         
33         clientThread->Join();
34         serverThread->Kill();//if client thread if finished, server thread is killed
35         return 0;
36 }