Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS3 / jaws3 / Event_Dispatcher.cpp
blob43ff3acd3e431f7d88bfdefefad5aa1e49f4d567
1 #include "ace/Log_Msg.h"
2 #include "ace/Thread.h"
3 #include "ace/Reactor.h"
4 #include "ace/Proactor.h"
5 #include "ace/POSIX_Proactor.h"
7 #ifndef JAWS_BUILD_DLL
8 #define JAWS_BUILD_DLL
9 #endif /*JAWS_BUILD_DLL*/
11 #include "jaws3/Event_Dispatcher.h"
13 static ACE_THR_FUNC_RETURN
14 JAWS_Event_Dispatcher_Proactor_Event_Loop (void *)
16 ACE_Proactor::run_event_loop ();
17 return 0;
21 void
22 JAWS_Event_Dispatcher::end_event_loop ()
24 ACE_Reactor::end_event_loop ();
28 void
29 JAWS_Event_Dispatcher::run_event_loop ()
31 // First, initiate the proactor thread
33 int result;
34 result = ACE_Thread::spawn ( JAWS_Event_Dispatcher_Proactor_Event_Loop
35 , 0
36 , THR_BOUND
38 if (result < 0)
40 ACE_ERROR ((LM_ERROR, "%p\n", "ACE_Thread::spawn"));
41 return;
44 // Now, enter the reactor's event loop.
45 ACE_Reactor::run_event_loop ();
47 // End the proactor's event loop if reactor was interrupted.
48 ACE_Proactor::end_event_loop ();