1 #include "ace/Proactor.h"
3 #include "JAWS/Waiter.h"
4 #include "JAWS/IO_Handler.h"
8 JAWS_Waiter::JAWS_Waiter (void)
13 JAWS_Waiter::~JAWS_Waiter (void)
17 JAWS_Waiter_Base_Iterator
&
18 JAWS_Waiter::iter (void)
24 JAWS_Waiter::index (void)
27 // A future version of ACE will support this.
28 ACE_Thread_ID tid
= ACE_OS::thr_self ();
30 // Do it this way for now
31 ACE_thread_t thr_name
;
32 thr_name
= ACE_OS::thr_self ();
34 JAWS_Thread_ID
tid (thr_name
);
37 return JAWS_Waiter_Base::index (tid
);
41 JAWS_Waiter::wait_for_completion (int i
)
44 JAWS_IO_Handler
**iohptr
;
46 iohptr
= (i
>= 0) ? this->find_by_index (i
) : this->find_by_index (this->index ());
49 if (ACE_Proactor::instance ()->handle_events () == -1)
51 ACE_ERROR ((LM_ERROR
, "%p\n", "JAWS_Waiter::wait_for_completion"));