FACT++  1.0
void do_work ( void *  tag)

Definition at line 37 of file rpc_client.cxx.

References dim_lock(), dim_print_date_time(), dim_unlock(), DimRpcInfo::getInt(), DimRpcInfo::setData(), and sprintf().

Referenced by main().

38 {
39  DimRpcInfo *myRpc;
40 // Rpc *myRpc;
41  char name[64];
42  int out, in;
43 
44  sprintf(name,"TESTRPC%ld/INT",(dim_long)tag);
45  myRpc = new DimRpcInfo(name, 10, -1);
46 // myRpc = new Rpc(name);
47 
48  out = 1;
49  while(1)
50  {
51  sleep(5);
52 // cout << "RPC Sent : " << out << endl;
53  myRpc->setData(out);
54  in = myRpc->getInt();
55 dim_lock();
57 cout << "Instance "<<(dim_long)tag<<" sent "<<out<< " got "<<in <<endl;
58 dim_unlock();
59  out++;
60  }
61 }
void dim_unlock()
Definition: dim_thr.c:472
long dim_long
Definition: dim_common.h:57
int getInt()
Definition: dic.hxx:405
void dim_lock()
Definition: dim_thr.c:455
void setData(void *data, int size)
Definition: dic.hxx:413
void dim_print_date_time()
Definition: utilities.c:134
sprintf(name1,"NewService%d", i)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: