Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / ACE / protocols / ace / RMCast / Simulator.cpp
blob1c003b6c5ac41144b54a80795b644a562a8a8b52
1 // author : Boris Kolpackov <boris@kolpackov.net>
2 #include "ace/OS_NS_time.h"
3 #include "Simulator.h"
5 namespace ACE_RMCast
7 Simulator::Simulator ()
9 ACE_OS::srand ((unsigned int)ACE_OS::time (0));
12 void Simulator::send (Message_ptr m)
14 // Note: Simulator may work in unpredictable ways mainly due
15 // to the "reliable loopback" mechanism.
17 out_->send (m);
18 return;
20 /*int r (rand ());
22 if ((r % 3) == 0) return;
24 Lock l (mutex_);
26 if (hold_.get ())
28 out_->send (m);
29 out_->send (hold_);
31 else
33 hold_ = m;
34 }*/