1 #include /**/ "ace/config-lite.h"
2 #include "ace/Proactor.h"
3 #if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
5 // This only works on Win32 platforms and on Unix platforms with aio
7 #include "ace/Proactor_Impl.h"
8 #include "ace/Object_Manager.h"
9 #include "ace/Task_T.h"
11 #if !defined (ACE_LACKS_ACE_SVCCONF)
12 # include "ace/Service_Config.h"
13 #endif /* !ACE_LACKS_ACE_SVCCONF */
15 #include "ace/Task_T.h"
16 #include "ace/Log_Category.h"
17 #include "ace/Framework_Component.h"
19 #if defined (ACE_HAS_AIO_CALLS)
20 # include "ace/POSIX_Proactor.h"
21 # include "ace/POSIX_CB_Proactor.h"
22 #else /* !ACE_HAS_AIO_CALLS */
23 # include "ace/WIN32_Proactor.h"
24 #endif /* ACE_HAS_AIO_CALLS */
26 #if !defined (__ACE_INLINE__)
27 #include "ace/Proactor.inl"
28 #endif /* __ACE_INLINE__ */
30 #include "ace/Auto_Event.h"
32 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
34 /// Process-wide ACE_Proactor.
35 ACE_Proactor
*ACE_Proactor::proactor_
= 0;
37 /// Controls whether the Proactor is deleted when we shut down (we can
38 /// only delete it safely if we created it!)
39 bool ACE_Proactor::delete_proactor_
= false;
42 * @class ACE_Proactor_Timer_Handler
44 * @brief A Handler for timer. It helps in the management of timers
45 * registered with the Proactor.
47 * This object has a thread that will wait on the earliest time
48 * in a list of timers and an event. When a timer expires, the
49 * thread will post a completion event on the port and go back
50 * to waiting on the timer queue and event. If the event is
51 * signaled, the thread will refresh the time it is currently
52 * waiting on (in case the earliest time has changed).
54 class ACE_Proactor_Timer_Handler
: public ACE_Task
<ACE_NULL_SYNCH
>
58 explicit ACE_Proactor_Timer_Handler (ACE_Proactor
&proactor
);
61 ~ACE_Proactor_Timer_Handler () override
;
63 /// Proactor calls this to shut down the timer handler
64 /// gracefully. Just calling the destructor alone doesnt do what
65 /// <destroy> does. <destroy> make sure the thread exits properly.
68 /// Proactor calls this to refresh the timer event thread, to wake
69 /// up the thread from a sleep. This is needed to make the thread
70 /// recompute its sleep time after changes to the timer queue.
74 /// Run by a daemon thread to handle deferred processing. In other
75 /// words, this method will do the waiting on the earliest timer and
80 ACE_Auto_Event timer_event_
;
83 ACE_Proactor
&proactor_
;
85 /// Flag used to indicate when we are shutting down.
89 ACE_Proactor_Timer_Handler::ACE_Proactor_Timer_Handler (ACE_Proactor
&proactor
)
90 : ACE_Task
<ACE_NULL_SYNCH
> (&proactor
.thr_mgr_
),
96 ACE_Proactor_Timer_Handler::~ACE_Proactor_Timer_Handler ()
102 ACE_Proactor_Timer_Handler::destroy ()
104 // Mark for closing down.
105 this->shutting_down_
= 1;
107 // Signal timer event.
108 this->timer_event_
.signal ();
110 // Wait for the Timer Handler thread to exit.
116 ACE_Proactor_Timer_Handler::signal ()
118 return this->timer_event_
.signal ();
122 ACE_Proactor_Timer_Handler::svc ()
124 ACE_Time_Value absolute_time
;
125 ACE_Time_Value relative_time
;
128 while (this->shutting_down_
== 0)
130 // Check whether the timer queue has any items in it.
131 if (this->proactor_
.timer_queue ()->is_empty () == 0)
133 // Get the earliest absolute time.
134 absolute_time
= this->proactor_
.timer_queue ()->earliest_time ();
136 // Get current time from timer queue since we don't know
137 // which <gettimeofday> was used.
138 ACE_Time_Value cur_time
=
139 this->proactor_
.timer_queue ()->gettimeofday ();
141 // Compare absolute time with curent time received from the
143 if (absolute_time
> cur_time
)
144 relative_time
= absolute_time
- cur_time
;
146 relative_time
= ACE_Time_Value::zero
;
148 // Block for relative time.
149 result
= this->timer_event_
.wait (&relative_time
, 0);
152 // The timer queue has no entries, so wait indefinitely.
153 result
= this->timer_event_
.wait ();
155 // Check for timer expiries.
161 // timeout: expire timers
162 this->proactor_
.timer_queue ()->expire ();
166 ACELIB_ERROR_RETURN ((LM_ERROR
,
167 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
168 ACE_TEXT ("ACE_Proactor_Timer_Handler::svc:wait failed")),
176 // *********************************************************************
178 ACE_Proactor_Handle_Timeout_Upcall::ACE_Proactor_Handle_Timeout_Upcall ()
184 ACE_Proactor_Handle_Timeout_Upcall::registration (ACE_Proactor_Timer_Queue
&,
185 ACE_Handler
* handler
,
188 handler
->proactor(proactor_
);
193 ACE_Proactor_Handle_Timeout_Upcall::preinvoke (ACE_Proactor_Timer_Queue
&,
197 const ACE_Time_Value
&,
204 ACE_Proactor_Handle_Timeout_Upcall::postinvoke (ACE_Proactor_Timer_Queue
&,
208 const ACE_Time_Value
&,
215 ACE_Proactor_Handle_Timeout_Upcall::timeout (ACE_Proactor_Timer_Queue
&,
216 ACE_Handler
*handler
,
219 const ACE_Time_Value
&time
)
221 if (this->proactor_
== 0)
222 ACELIB_ERROR_RETURN ((LM_ERROR
,
223 ACE_TEXT ("(%t) No Proactor set in ACE_Proactor_Handle_Timeout_Upcall,")
224 ACE_TEXT (" no completion port to post timeout to?!@\n")),
227 // Create the Asynch_Timer.
228 ACE_Asynch_Result_Impl
*asynch_timer
=
229 this->proactor_
->create_asynch_timer (handler
->proxy (),
236 if (asynch_timer
== 0)
237 ACELIB_ERROR_RETURN ((LM_ERROR
,
238 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
239 ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall::timeout:")
240 ACE_TEXT ("create_asynch_timer failed")),
243 std::unique_ptr
<ACE_Asynch_Result_Impl
> safe_asynch_timer (asynch_timer
);
245 // Post a completion.
246 if (-1 == safe_asynch_timer
->post_completion
247 (this->proactor_
->implementation ()))
248 ACELIB_ERROR_RETURN ((LM_ERROR
,
249 ACE_TEXT ("Failure in dealing with timers: ")
250 ACE_TEXT ("PostQueuedCompletionStatus failed\n")),
253 // The completion has been posted. The proactor is now responsible
254 // for managing the asynch_timer memory.
255 (void) safe_asynch_timer
.release ();
261 ACE_Proactor_Handle_Timeout_Upcall::cancel_type (ACE_Proactor_Timer_Queue
&,
271 ACE_Proactor_Handle_Timeout_Upcall::cancel_timer (ACE_Proactor_Timer_Queue
&,
281 ACE_Proactor_Handle_Timeout_Upcall::deletion (ACE_Proactor_Timer_Queue
&,
290 ACE_Proactor_Handle_Timeout_Upcall::proactor (ACE_Proactor
&proactor
)
292 if (this->proactor_
== 0)
294 this->proactor_
= &proactor
;
298 ACELIB_ERROR_RETURN ((LM_ERROR
,
299 ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall is only suppose")
300 ACE_TEXT (" to be used with ONE (and only one) Proactor\n")),
304 // *********************************************************************
306 ACE_Proactor::ACE_Proactor (ACE_Proactor_Impl
*implementation
,
307 bool delete_implementation
,
308 ACE_Proactor_Timer_Queue
*tq
)
309 : implementation_ (0),
310 delete_implementation_ (delete_implementation
),
313 delete_timer_queue_ (0),
315 event_loop_thread_count_ (0)
317 this->implementation (implementation
);
319 if (this->implementation () == 0)
321 #if defined (ACE_HAS_AIO_CALLS)
323 # if defined (ACE_POSIX_AIOCB_PROACTOR)
324 ACE_NEW (implementation
, ACE_POSIX_AIOCB_Proactor
);
325 # elif defined (ACE_POSIX_SIG_PROACTOR)
326 ACE_NEW (implementation
, ACE_POSIX_SIG_Proactor
);
327 # else /* Default order: CB, SIG, AIOCB */
328 # if !defined(ACE_HAS_BROKEN_SIGEVENT_STRUCT)
329 ACE_NEW (implementation
, ACE_POSIX_CB_Proactor
);
331 # if defined(ACE_HAS_POSIX_REALTIME_SIGNALS)
332 ACE_NEW (implementation
, ACE_POSIX_SIG_Proactor
);
334 ACE_NEW (implementation
, ACE_POSIX_AIOCB_Proactor
);
335 # endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */
336 # endif /* !ACE_HAS_BROKEN_SIGEVENT_STRUCT */
337 # endif /* ACE_POSIX_AIOCB_PROACTOR */
338 #elif defined (ACE_WIN32)
340 ACE_NEW (implementation
,
342 #endif /* ACE_HAS_AIO_CALLS */
343 this->implementation (implementation
);
344 this->delete_implementation_
= true;
347 // Set the timer queue.
348 this->timer_queue (tq
);
350 // Create the timer handler
351 ACE_NEW (this->timer_handler_
,
352 ACE_Proactor_Timer_Handler (*this));
354 // Activate <timer_handler>.
355 if (this->timer_handler_
->activate () == -1)
356 ACELIB_ERROR ((LM_ERROR
,
357 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
358 ACE_TEXT ("Task::activate:could not create thread\n")));
361 ACE_Proactor::~ACE_Proactor ()
367 ACE_Proactor::instance (size_t /* threads */)
369 ACE_TRACE ("ACE_Proactor::instance");
371 if (ACE_Proactor::proactor_
== 0)
373 // Perform Double-Checked Locking Optimization.
374 ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex
, ace_mon
,
375 *ACE_Static_Object_Lock::instance (),
378 if (ACE_Proactor::proactor_
== 0)
380 ACE_NEW_RETURN (ACE_Proactor::proactor_
,
384 ACE_Proactor::delete_proactor_
= true;
385 ACE_REGISTER_FRAMEWORK_COMPONENT(ACE_Proactor
, ACE_Proactor::proactor_
);
388 return ACE_Proactor::proactor_
;
392 ACE_Proactor::instance (ACE_Proactor
* r
, bool delete_proactor
)
394 ACE_TRACE ("ACE_Proactor::instance");
396 ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex
, ace_mon
,
397 *ACE_Static_Object_Lock::instance (), 0));
399 ACE_Proactor
*t
= ACE_Proactor::proactor_
;
401 ACE_Proactor::delete_proactor_
= delete_proactor
;
402 ACE_Proactor::proactor_
= r
;
403 ACE_REGISTER_FRAMEWORK_COMPONENT(ACE_Proactor
, ACE_Proactor::proactor_
);
409 ACE_Proactor::close_singleton ()
411 ACE_TRACE ("ACE_Proactor::close_singleton");
413 ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex
, ace_mon
,
414 *ACE_Static_Object_Lock::instance ()));
416 if (ACE_Proactor::delete_proactor_
)
418 delete ACE_Proactor::proactor_
;
419 ACE_Proactor::proactor_
= 0;
420 ACE_Proactor::delete_proactor_
= false;
425 ACE_Proactor::dll_name ()
427 return ACE_TEXT ("ACE");
431 ACE_Proactor::name ()
433 return ACE_TEXT ("ACE_Proactor");
437 ACE_Proactor::check_reconfiguration (ACE_Proactor
*)
439 #if !defined (ACE_LACKS_ACE_SVCCONF)
440 if (ACE_Service_Config::reconfig_occurred ())
442 ACE_Service_Config::reconfigure ();
445 #endif /* !ACE_LACKS_ACE_SVCCONF */
450 ACE_Proactor::proactor_run_event_loop (PROACTOR_EVENT_HOOK eh
)
452 ACE_TRACE ("ACE_Proactor::proactor_run_event_loop");
456 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
458 // Early check. It is ok to do this without lock, since we care just
459 // whether it is zero or non-zero.
460 if (this->end_event_loop_
!= 0)
463 // First time you are in. Increment the thread count.
464 this->event_loop_thread_count_
++;
467 // Run the event loop.
470 // Check the end loop flag. It is ok to do this without lock,
471 // since we care just whether it is zero or non-zero.
472 if (this->end_event_loop_
!= 0)
475 // <end_event_loop> is not set. Ready to do <handle_events>.
476 result
= this->handle_events ();
478 if (eh
!= 0 && (*eh
) (this))
485 // Leaving the event loop. Decrement the thread count.
488 // Obtain the lock in the MT environments.
489 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
491 // Decrement the thread count.
492 this->event_loop_thread_count_
--;
494 if (this->event_loop_thread_count_
> 0
495 && this->end_event_loop_
!= 0)
496 this->proactor_post_wakeup_completions (1);
502 // Handle events for -tv- time. handle_events updates -tv- to reflect
503 // time elapsed, so do not return until -tv- == 0, or an error occurs.
505 ACE_Proactor::proactor_run_event_loop (ACE_Time_Value
&tv
,
506 PROACTOR_EVENT_HOOK eh
)
508 ACE_TRACE ("ACE_Proactor::proactor_run_event_loop");
512 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
514 // Early check. It is ok to do this without lock, since we care just
515 // whether it is zero or non-zero.
516 if (this->end_event_loop_
!= 0
517 || tv
== ACE_Time_Value::zero
)
520 // First time you are in. Increment the thread count.
521 this->event_loop_thread_count_
++;
524 // Run the event loop.
527 // Check the end loop flag. It is ok to do this without lock,
528 // since we care just whether it is zero or non-zero.
529 if (this->end_event_loop_
!= 0)
532 // <end_event_loop> is not set. Ready to do <handle_events>.
533 result
= this->handle_events (tv
);
535 if (eh
!= 0 && (*eh
) (this))
538 if (result
== -1 || result
== 0)
542 // Leaving the event loop. Decrement the thread count.
545 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
547 // Decrement the thread count.
548 this->event_loop_thread_count_
--;
550 if (this->event_loop_thread_count_
> 0
551 && this->end_event_loop_
!= 0)
552 this->proactor_post_wakeup_completions (1);
559 ACE_Proactor::proactor_reset_event_loop()
561 ACE_TRACE ("ACE_Proactor::proactor_reset_event_loop");
563 // Obtain the lock in the MT environments.
564 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
566 this->end_event_loop_
= 0;
571 ACE_Proactor::proactor_end_event_loop ()
573 ACE_TRACE ("ACE_Proactor::proactor_end_event_loop");
578 // Obtain the lock, set the end flag and post the wakeup
580 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
583 this->end_event_loop_
= 1;
585 // Number of completions to post.
586 how_many
= this->event_loop_thread_count_
;
591 // Post completions to all the threads so that they will all wake
593 return this->proactor_post_wakeup_completions (how_many
);
597 ACE_Proactor::proactor_event_loop_done ()
599 ACE_TRACE ("ACE_Proactor::proactor_event_loop_done");
601 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
603 return this->end_event_loop_
!= 0 ? 1 : 0 ;
607 ACE_Proactor::close ()
609 // Close the implementation.
610 if (this->implementation ()->close () == -1)
611 ACELIB_ERROR ((LM_ERROR
,
612 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
613 ACE_TEXT ("ACE_Proactor::close: implementation close")));
615 // Delete the implementation.
616 if (this->delete_implementation_
)
618 delete this->implementation ();
619 this->implementation_
= 0;
622 // Delete the timer handler.
623 if (this->timer_handler_
)
625 delete this->timer_handler_
;
626 this->timer_handler_
= 0;
629 // Delete the timer queue.
630 if (this->delete_timer_queue_
)
632 delete this->timer_queue_
;
633 this->timer_queue_
= 0;
634 this->delete_timer_queue_
= 0;
636 else if (this->timer_queue_
)
638 this->timer_queue_
->close ();
639 this->timer_queue_
= 0;
646 ACE_Proactor::register_handle (ACE_HANDLE handle
,
647 const void *completion_key
)
649 return this->implementation ()->register_handle (handle
,
654 ACE_Proactor::schedule_timer (ACE_Handler
&handler
,
656 const ACE_Time_Value
&time
)
658 return this->schedule_timer (handler
,
661 ACE_Time_Value::zero
);
665 ACE_Proactor::schedule_repeating_timer (ACE_Handler
&handler
,
667 const ACE_Time_Value
&interval
)
669 return this->schedule_timer (handler
,
676 ACE_Proactor::schedule_timer (ACE_Handler
&handler
,
678 const ACE_Time_Value
&time
,
679 const ACE_Time_Value
&interval
)
682 ACE_Time_Value absolute_time
=
683 this->timer_queue_
->gettimeofday () + time
;
684 long result
= this->timer_queue_
->schedule (&handler
,
690 // Signal the timer thread to make sure that new events are
691 // dispatched and the sleep time is updated.
692 (void) this->timer_handler_
->signal ();
699 ACE_Proactor::cancel_timer (long timer_id
,
701 int dont_call_handle_close
)
703 // No need to singal timer event here. Even if the cancel timer was
704 // the earliest, we will have an extra wakeup.
705 return this->timer_queue_
->cancel (timer_id
,
707 dont_call_handle_close
);
711 ACE_Proactor::cancel_timer (ACE_Handler
&handler
,
712 int dont_call_handle_close
)
714 // No need to signal timer event here. Even if the cancel timer was
715 // the earliest, we will have an extra wakeup.
716 return this->timer_queue_
->cancel (&handler
,
717 dont_call_handle_close
);
721 ACE_Proactor::handle_events (ACE_Time_Value
&wait_time
)
723 return implementation ()->handle_events (wait_time
);
727 ACE_Proactor::handle_events ()
729 return this->implementation ()->handle_events ();
733 ACE_Proactor::wake_up_dispatch_threads ()
739 ACE_Proactor::close_dispatch_threads (int)
745 ACE_Proactor::number_of_threads () const
747 return this->implementation ()->number_of_threads ();
751 ACE_Proactor::number_of_threads (size_t threads
)
753 this->implementation ()->number_of_threads (threads
);
756 ACE_Proactor_Timer_Queue
*
757 ACE_Proactor::timer_queue () const
759 return this->timer_queue_
;
763 ACE_Proactor::timer_queue (ACE_Proactor_Timer_Queue
*tq
)
765 // Cleanup old timer queue.
766 if (this->delete_timer_queue_
)
768 delete this->timer_queue_
;
769 this->delete_timer_queue_
= 0;
771 else if (this->timer_queue_
)
773 this->timer_queue_
->close ();
779 ACE_NEW (this->timer_queue_
,
781 this->delete_timer_queue_
= 1;
785 this->timer_queue_
= tq
;
786 this->delete_timer_queue_
= 0;
789 // Set the proactor in the timer queue's functor
790 using TQ_Base
= ACE_Timer_Queue_Upcall_Base
<ACE_Handler
*, ACE_Proactor_Handle_Timeout_Upcall
>;
792 TQ_Base
* tqb
= dynamic_cast<TQ_Base
*> (this->timer_queue_
);
796 tqb
->upcall_functor ().proactor (*this);
801 ACE_Proactor::get_handle () const
803 return this->implementation ()->get_handle ();
807 ACE_Proactor::implementation () const
809 return this->implementation_
;
813 ACE_Asynch_Read_Stream_Impl
*
814 ACE_Proactor::create_asynch_read_stream ()
816 return this->implementation ()->create_asynch_read_stream ();
819 ACE_Asynch_Write_Stream_Impl
*
820 ACE_Proactor::create_asynch_write_stream ()
822 return this->implementation ()->create_asynch_write_stream ();
825 ACE_Asynch_Read_Dgram_Impl
*
826 ACE_Proactor::create_asynch_read_dgram ()
828 return this->implementation ()->create_asynch_read_dgram ();
831 ACE_Asynch_Write_Dgram_Impl
*
832 ACE_Proactor::create_asynch_write_dgram ()
834 return this->implementation ()->create_asynch_write_dgram ();
837 ACE_Asynch_Read_File_Impl
*
838 ACE_Proactor::create_asynch_read_file ()
840 return this->implementation ()->create_asynch_read_file ();
843 ACE_Asynch_Write_File_Impl
*
844 ACE_Proactor::create_asynch_write_file ()
846 return this->implementation ()->create_asynch_write_file ();
849 ACE_Asynch_Accept_Impl
*
850 ACE_Proactor::create_asynch_accept ()
852 return this->implementation ()->create_asynch_accept ();
855 ACE_Asynch_Connect_Impl
*
856 ACE_Proactor::create_asynch_connect ()
858 return this->implementation ()->create_asynch_connect ();
861 ACE_Asynch_Transmit_File_Impl
*
862 ACE_Proactor::create_asynch_transmit_file ()
864 return this->implementation ()->create_asynch_transmit_file ();
867 ACE_Asynch_Read_Stream_Result_Impl
*
868 ACE_Proactor::create_asynch_read_stream_result
869 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
871 ACE_Message_Block
&message_block
,
872 u_long bytes_to_read
,
878 return this->implementation ()->create_asynch_read_stream_result
890 ACE_Asynch_Write_Stream_Result_Impl
*
891 ACE_Proactor::create_asynch_write_stream_result
892 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
894 ACE_Message_Block
&message_block
,
895 u_long bytes_to_write
,
901 return this->implementation ()->create_asynch_write_stream_result
912 ACE_Asynch_Read_File_Result_Impl
*
913 ACE_Proactor::create_asynch_read_file_result
914 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
916 ACE_Message_Block
&message_block
,
917 u_long bytes_to_read
,
925 return this->implementation ()->create_asynch_read_file_result
938 ACE_Asynch_Write_File_Result_Impl
*
939 ACE_Proactor::create_asynch_write_file_result
940 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
942 ACE_Message_Block
&message_block
,
943 u_long bytes_to_write
,
951 return this->implementation ()->create_asynch_write_file_result
964 ACE_Asynch_Read_Dgram_Result_Impl
*
965 ACE_Proactor::create_asynch_read_dgram_result
966 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
968 ACE_Message_Block
*message_block
,
969 size_t bytes_to_read
,
977 return this->implementation()->create_asynch_read_dgram_result
990 ACE_Asynch_Write_Dgram_Result_Impl
*
991 ACE_Proactor::create_asynch_write_dgram_result
992 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
994 ACE_Message_Block
*message_block
,
995 size_t bytes_to_write
,
1002 return this->implementation()->create_asynch_write_dgram_result
1014 ACE_Asynch_Accept_Result_Impl
*
1015 ACE_Proactor::create_asynch_accept_result
1016 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1017 ACE_HANDLE listen_handle
,
1018 ACE_HANDLE accept_handle
,
1019 ACE_Message_Block
&message_block
,
1020 u_long bytes_to_read
,
1026 return this->implementation ()->create_asynch_accept_result
1038 ACE_Asynch_Connect_Result_Impl
*
1039 ACE_Proactor::create_asynch_connect_result
1040 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1041 ACE_HANDLE connect_handle
,
1047 return this->implementation ()->create_asynch_connect_result
1056 ACE_Asynch_Transmit_File_Result_Impl
*
1057 ACE_Proactor::create_asynch_transmit_file_result
1058 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1061 ACE_Asynch_Transmit_File::Header_And_Trailer
*header_and_trailer
,
1062 u_long bytes_to_write
,
1065 u_long bytes_per_send
,
1072 return this->implementation ()->create_asynch_transmit_file_result
1088 ACE_Asynch_Result_Impl
*
1089 ACE_Proactor::create_asynch_timer
1090 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1092 const ACE_Time_Value
&tv
,
1097 return this->implementation ()->create_asynch_timer
1107 ACE_Proactor::proactor_post_wakeup_completions (int how_many
)
1109 return this->implementation ()->post_wakeup_completions (how_many
);
1113 ACE_Proactor::implementation (ACE_Proactor_Impl
*implementation
)
1115 this->implementation_
= implementation
;
1118 ACE_END_VERSIONED_NAMESPACE_DECL
1120 #else /* !ACE_WIN32 || !ACE_HAS_AIO_CALLS */
1122 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
1125 ACE_Proactor::instance (size_t /* threads */)
1131 ACE_Proactor::instance (ACE_Proactor
*)
1137 ACE_Proactor::close_singleton ()
1142 ACE_Proactor::run_event_loop ()
1149 ACE_Proactor::run_event_loop (ACE_Time_Value
&)
1156 ACE_Proactor::end_event_loop ()
1163 ACE_Proactor::event_loop_done ()
1165 return sig_atomic_t (1);
1168 ACE_END_VERSIONED_NAMESPACE_DECL
1170 #endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */