5 #include "ace/Singleton.h"
7 #if !defined (ACE_LACKS_PRAGMA_ONCE)
9 #endif /* ACE_LACKS_PRAGMA_ONCE */
11 #include "ace/Synch_Traits.h"
12 #include "JAWS/Assoc_Array.h"
13 #include "JAWS/Export.h"
15 class JAWS_IO_Handler
;
17 typedef ACE_thread_t JAWS_Thread_ID
;
19 typedef JAWS_Assoc_Array
<JAWS_Thread_ID
, JAWS_IO_Handler
*> JAWS_Waiter_Base
;
20 typedef JAWS_Assoc_Array_Iterator
<JAWS_Thread_ID
, JAWS_IO_Handler
*>
21 JAWS_Waiter_Base_Iterator
;
23 class JAWS_Export JAWS_Waiter
: public JAWS_Waiter_Base
29 JAWS_Waiter_Base_Iterator
&iter ();
30 // Returns an iterator to the headers container.
33 // Returns the index into the table associated with calling thread.
35 JAWS_IO_Handler
* wait_for_completion (int i
= -1);
36 // The entry point for this class, handles outstanding asynchronous
37 // events. Can optionally accept a parameter that points to which
38 // table entry to return.
41 JAWS_Waiter_Base_Iterator iter_
;
44 typedef ACE_Singleton
<JAWS_Waiter
, ACE_SYNCH_MUTEX
> JAWS_Waiter_Singleton
;
46 #endif /* JAWS_WAITER_H */