1 #include "ace/Proactor.h"
3 #include "JAWS/Waiter.h"
4 #include "JAWS/IO_Handler.h"
7 JAWS_Waiter::JAWS_Waiter ()
12 JAWS_Waiter::~JAWS_Waiter ()
16 JAWS_Waiter_Base_Iterator
&
26 // A future version of ACE will support this.
27 ACE_Thread_ID tid
= ACE_OS::thr_self ();
29 // Do it this way for now
30 ACE_thread_t thr_name
;
31 thr_name
= ACE_OS::thr_self ();
33 JAWS_Thread_ID
tid (thr_name
);
36 return JAWS_Waiter_Base::index (tid
);
40 JAWS_Waiter::wait_for_completion (int i
)
43 JAWS_IO_Handler
**iohptr
;
45 iohptr
= (i
>= 0) ? this->find_by_index (i
) : this->find_by_index (this->index ());
48 if (ACE_Proactor::instance ()->handle_events () == -1)
50 ACE_ERROR ((LM_ERROR
, "%p\n", "JAWS_Waiter::wait_for_completion"));