1 // $Id: Proactor.cpp 81535 2008-04-29 20:08:52Z shuston $
3 #include "ace/config-lite.h"
4 #include "ace/Proactor.h"
5 #if defined (ACE_HAS_WIN32_OVERLAPPED_IO) || defined (ACE_HAS_AIO_CALLS)
7 // This only works on Win32 platforms and on Unix platforms with aio
10 #include "ace/Auto_Ptr.h"
11 #include "ace/Proactor_Impl.h"
12 #include "ace/Object_Manager.h"
13 #include "ace/Task_T.h"
15 #if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_SVCCONF)
16 # include "ace/Service_Config.h"
17 #endif /* !ACE_HAS_WINCE && !ACE_LACKS_ACE_SVCCONF */
22 "$Id: Proactor.cpp 81535 2008-04-29 20:08:52Z shuston $")
25 #include "ace/Task_T.h"
26 #include "ace/Log_Msg.h"
27 #include "ace/Framework_Component.h"
29 #if defined (ACE_HAS_AIO_CALLS)
30 # include "ace/POSIX_Proactor.h"
31 # include "ace/POSIX_CB_Proactor.h"
32 #else /* !ACE_HAS_AIO_CALLS */
33 # include "ace/WIN32_Proactor.h"
34 #endif /* ACE_HAS_AIO_CALLS */
36 #if !defined (__ACE_INLINE__)
37 #include "ace/Proactor.inl"
38 #endif /* __ACE_INLINE__ */
40 #include "ace/Auto_Event.h"
42 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
44 /// Process-wide ACE_Proactor.
45 ACE_Proactor
*ACE_Proactor::proactor_
= 0;
47 /// Controls whether the Proactor is deleted when we shut down (we can
48 /// only delete it safely if we created it!)
49 bool ACE_Proactor::delete_proactor_
= false;
52 * @class ACE_Proactor_Timer_Handler
54 * @brief A Handler for timer. It helps in the management of timers
55 * registered with the Proactor.
57 * This object has a thread that will wait on the earliest time
58 * in a list of timers and an event. When a timer expires, the
59 * thread will post a completion event on the port and go back
60 * to waiting on the timer queue and event. If the event is
61 * signaled, the thread will refresh the time it is currently
62 * waiting on (in case the earliest time has changed).
64 class ACE_Proactor_Timer_Handler
: public ACE_Task
<ACE_NULL_SYNCH
>
67 /// Proactor has special privileges
68 /// Access needed to: timer_event_
69 friend class ACE_Proactor
;
73 ACE_Proactor_Timer_Handler (ACE_Proactor
&proactor
);
76 virtual ~ACE_Proactor_Timer_Handler (void);
78 /// Proactor calls this to shut down the timer handler
79 /// gracefully. Just calling the destructor alone doesnt do what
80 /// <destroy> does. <destroy> make sure the thread exits properly.
84 /// Run by a daemon thread to handle deferred processing. In other
85 /// words, this method will do the waiting on the earliest timer and
87 virtual int svc (void);
90 ACE_Auto_Event timer_event_
;
93 ACE_Proactor
&proactor_
;
95 /// Flag used to indicate when we are shutting down.
99 ACE_Proactor_Timer_Handler::ACE_Proactor_Timer_Handler (ACE_Proactor
&proactor
)
100 : ACE_Task
<ACE_NULL_SYNCH
> (&proactor
.thr_mgr_
),
101 proactor_ (proactor
),
106 ACE_Proactor_Timer_Handler::~ACE_Proactor_Timer_Handler (void)
108 // Mark for closing down.
109 this->shutting_down_
= 1;
111 // Signal timer event.
112 this->timer_event_
.signal ();
114 // Wait for the Timer Handler thread to exit.
119 ACE_Proactor_Timer_Handler::svc (void)
121 ACE_Time_Value absolute_time
;
122 ACE_Time_Value relative_time
;
125 while (this->shutting_down_
== 0)
127 // Check whether the timer queue has any items in it.
128 if (this->proactor_
.timer_queue ()->is_empty () == 0)
130 // Get the earliest absolute time.
131 absolute_time
= this->proactor_
.timer_queue ()->earliest_time ();
133 // Get current time from timer queue since we don't know
134 // which <gettimeofday> was used.
135 ACE_Time_Value cur_time
= this->proactor_
.timer_queue ()->gettimeofday ();
137 // Compare absolute time with curent time received from the
139 if (absolute_time
> cur_time
)
140 relative_time
= absolute_time
- cur_time
;
142 relative_time
= ACE_Time_Value::zero
;
144 // Block for relative time.
145 result
= this->timer_event_
.wait (&relative_time
, 0);
148 // The timer queue has no entries, so wait indefinitely.
149 result
= this->timer_event_
.wait ();
151 // Check for timer expiries.
157 // timeout: expire timers
158 this->proactor_
.timer_queue ()->expire ();
162 ACE_ERROR_RETURN ((LM_ERROR
,
163 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
164 ACE_TEXT ("ACE_Proactor_Timer_Handler::svc:wait failed")),
172 // *********************************************************************
174 ACE_Proactor_Handle_Timeout_Upcall::ACE_Proactor_Handle_Timeout_Upcall (void)
180 ACE_Proactor_Handle_Timeout_Upcall::registration (TIMER_QUEUE
&,
188 ACE_Proactor_Handle_Timeout_Upcall::preinvoke (TIMER_QUEUE
&,
192 const ACE_Time_Value
&,
199 ACE_Proactor_Handle_Timeout_Upcall::postinvoke (TIMER_QUEUE
&,
203 const ACE_Time_Value
&,
210 ACE_Proactor_Handle_Timeout_Upcall::timeout (TIMER_QUEUE
&,
211 ACE_Handler
*handler
,
214 const ACE_Time_Value
&time
)
216 if (this->proactor_
== 0)
217 ACE_ERROR_RETURN ((LM_ERROR
,
218 ACE_TEXT ("(%t) No Proactor set in ACE_Proactor_Handle_Timeout_Upcall,")
219 ACE_TEXT (" no completion port to post timeout to?!@\n")),
222 // Create the Asynch_Timer.
223 ACE_Asynch_Result_Impl
*asynch_timer
=
224 this->proactor_
->create_asynch_timer (handler
->proxy (),
231 if (asynch_timer
== 0)
232 ACE_ERROR_RETURN ((LM_ERROR
,
233 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
234 ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall::timeout:")
235 ACE_TEXT ("create_asynch_timer failed")),
238 auto_ptr
<ACE_Asynch_Result_Impl
> safe_asynch_timer (asynch_timer
);
240 // Post a completion.
241 if (-1 == safe_asynch_timer
->post_completion
242 (this->proactor_
->implementation ()))
243 ACE_ERROR_RETURN ((LM_ERROR
,
244 ACE_TEXT ("Failure in dealing with timers: ")
245 ACE_TEXT ("PostQueuedCompletionStatus failed\n")),
248 // The completion has been posted. The proactor is now responsible
249 // for managing the asynch_timer memory.
250 (void) safe_asynch_timer
.release ();
256 ACE_Proactor_Handle_Timeout_Upcall::cancel_type (TIMER_QUEUE
&,
266 ACE_Proactor_Handle_Timeout_Upcall::cancel_timer (TIMER_QUEUE
&,
276 ACE_Proactor_Handle_Timeout_Upcall::deletion (TIMER_QUEUE
&,
285 ACE_Proactor_Handle_Timeout_Upcall::proactor (ACE_Proactor
&proactor
)
287 if (this->proactor_
== 0)
289 this->proactor_
= &proactor
;
293 ACE_ERROR_RETURN ((LM_ERROR
,
294 ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall is only suppose")
295 ACE_TEXT (" to be used with ONE (and only one) Proactor\n")),
299 // *********************************************************************
301 ACE_Proactor::ACE_Proactor (ACE_Proactor_Impl
*implementation
,
302 bool delete_implementation
,
304 : implementation_ (0),
305 delete_implementation_ (delete_implementation
),
308 delete_timer_queue_ (0),
310 event_loop_thread_count_ (0)
312 this->implementation (implementation
);
314 if (this->implementation () == 0)
316 #if defined (ACE_HAS_AIO_CALLS)
318 # if defined (ACE_POSIX_AIOCB_PROACTOR)
319 ACE_NEW (implementation
, ACE_POSIX_AIOCB_Proactor
);
320 # elif defined (ACE_POSIX_SIG_PROACTOR)
321 ACE_NEW (implementation
, ACE_POSIX_SIG_Proactor
);
322 # else /* Default order: CB, SIG, AIOCB */
323 # if !defined(ACE_HAS_BROKEN_SIGEVENT_STRUCT)
324 ACE_NEW (implementation
, ACE_POSIX_CB_Proactor
);
326 # if defined(ACE_HAS_POSIX_REALTIME_SIGNALS)
327 ACE_NEW (implementation
, ACE_POSIX_SIG_Proactor
);
329 ACE_NEW (implementation
, ACE_POSIX_AIOCB_Proactor
);
330 # endif /* ACE_HAS_POSIX_REALTIME_SIGNALS */
331 # endif /* !ACE_HAS_BROKEN_SIGEVENT_STRUCT */
332 # endif /* ACE_POSIX_AIOCB_PROACTOR */
333 #elif (defined (ACE_WIN32) && !defined (ACE_HAS_WINCE))
335 ACE_NEW (implementation
,
337 #endif /* ACE_HAS_AIO_CALLS */
338 this->implementation (implementation
);
339 this->delete_implementation_
= true;
342 // Set the timer queue.
343 this->timer_queue (tq
);
345 // Create the timer handler
346 ACE_NEW (this->timer_handler_
,
347 ACE_Proactor_Timer_Handler (*this));
349 // Activate <timer_handler>.
350 if (this->timer_handler_
->activate () == -1)
351 ACE_ERROR ((LM_ERROR
,
352 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
353 ACE_TEXT ("Task::activate:could not create thread\n")));
356 ACE_Proactor::~ACE_Proactor (void)
362 ACE_Proactor::instance (size_t /* threads */)
364 ACE_TRACE ("ACE_Proactor::instance");
366 if (ACE_Proactor::proactor_
== 0)
368 // Perform Double-Checked Locking Optimization.
369 ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex
, ace_mon
,
370 *ACE_Static_Object_Lock::instance (),
373 if (ACE_Proactor::proactor_
== 0)
375 ACE_NEW_RETURN (ACE_Proactor::proactor_
,
379 ACE_Proactor::delete_proactor_
= true;
380 ACE_REGISTER_FRAMEWORK_COMPONENT(ACE_Proactor
, ACE_Proactor::proactor_
);
383 return ACE_Proactor::proactor_
;
387 ACE_Proactor::instance (ACE_Proactor
* r
, bool delete_proactor
)
389 ACE_TRACE ("ACE_Proactor::instance");
391 ACE_MT (ACE_GUARD_RETURN (ACE_Recursive_Thread_Mutex
, ace_mon
,
392 *ACE_Static_Object_Lock::instance (), 0));
394 ACE_Proactor
*t
= ACE_Proactor::proactor_
;
396 ACE_Proactor::delete_proactor_
= delete_proactor
;
397 ACE_Proactor::proactor_
= r
;
398 ACE_REGISTER_FRAMEWORK_COMPONENT(ACE_Proactor
, ACE_Proactor::proactor_
);
404 ACE_Proactor::close_singleton (void)
406 ACE_TRACE ("ACE_Proactor::close_singleton");
408 ACE_MT (ACE_GUARD (ACE_Recursive_Thread_Mutex
, ace_mon
,
409 *ACE_Static_Object_Lock::instance ()));
411 if (ACE_Proactor::delete_proactor_
)
413 delete ACE_Proactor::proactor_
;
414 ACE_Proactor::proactor_
= 0;
415 ACE_Proactor::delete_proactor_
= false;
420 ACE_Proactor::dll_name (void)
422 return ACE_TEXT ("ACE");
426 ACE_Proactor::name (void)
428 return ACE_TEXT ("ACE_Proactor");
432 ACE_Proactor::check_reconfiguration (ACE_Proactor
*)
434 #if !defined (ACE_HAS_WINCE) && !defined (ACE_LACKS_ACE_SVCCONF)
435 if (ACE_Service_Config::reconfig_occurred ())
437 ACE_Service_Config::reconfigure ();
440 #endif /* ! ACE_HAS_WINCE || ! ACE_LACKS_ACE_SVCCONF */
445 ACE_Proactor::proactor_run_event_loop (PROACTOR_EVENT_HOOK eh
)
447 ACE_TRACE ("ACE_Proactor::proactor_run_event_loop");
451 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
453 // Early check. It is ok to do this without lock, since we care just
454 // whether it is zero or non-zero.
455 if (this->end_event_loop_
!= 0)
458 // First time you are in. Increment the thread count.
459 this->event_loop_thread_count_
++;
462 // Run the event loop.
465 // Check the end loop flag. It is ok to do this without lock,
466 // since we care just whether it is zero or non-zero.
467 if (this->end_event_loop_
!= 0)
470 // <end_event_loop> is not set. Ready to do <handle_events>.
471 result
= this->handle_events ();
473 if (eh
!= 0 && (*eh
) (this))
480 // Leaving the event loop. Decrement the thread count.
483 // Obtain the lock in the MT environments.
484 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
486 // Decrement the thread count.
487 this->event_loop_thread_count_
--;
489 if (this->event_loop_thread_count_
> 0
490 && this->end_event_loop_
!= 0)
491 this->proactor_post_wakeup_completions (1);
497 // Handle events for -tv- time. handle_events updates -tv- to reflect
498 // time elapsed, so do not return until -tv- == 0, or an error occurs.
500 ACE_Proactor::proactor_run_event_loop (ACE_Time_Value
&tv
,
501 PROACTOR_EVENT_HOOK eh
)
503 ACE_TRACE ("ACE_Proactor::proactor_run_event_loop");
507 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
509 // Early check. It is ok to do this without lock, since we care just
510 // whether it is zero or non-zero.
511 if (this->end_event_loop_
!= 0
512 || tv
== ACE_Time_Value::zero
)
515 // First time you are in. Increment the thread count.
516 this->event_loop_thread_count_
++;
519 // Run the event loop.
522 // Check the end loop flag. It is ok to do this without lock,
523 // since we care just whether it is zero or non-zero.
524 if (this->end_event_loop_
!= 0)
527 // <end_event_loop> is not set. Ready to do <handle_events>.
528 result
= this->handle_events (tv
);
530 if (eh
!= 0 && (*eh
) (this))
533 if (result
== -1 || result
== 0)
537 // Leaving the event loop. Decrement the thread count.
540 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
542 // Decrement the thread count.
543 this->event_loop_thread_count_
--;
545 if (this->event_loop_thread_count_
> 0
546 && this->end_event_loop_
!= 0)
547 this->proactor_post_wakeup_completions (1);
554 ACE_Proactor::proactor_reset_event_loop(void)
556 ACE_TRACE ("ACE_Proactor::proactor_reset_event_loop");
558 // Obtain the lock in the MT environments.
559 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
561 this->end_event_loop_
= 0;
566 ACE_Proactor::proactor_end_event_loop (void)
568 ACE_TRACE ("ACE_Proactor::proactor_end_event_loop");
573 // Obtain the lock, set the end flag and post the wakeup
575 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
578 this->end_event_loop_
= 1;
580 // Number of completions to post.
581 how_many
= this->event_loop_thread_count_
;
586 // Post completions to all the threads so that they will all wake
588 return this->proactor_post_wakeup_completions (how_many
);
592 ACE_Proactor::proactor_event_loop_done (void)
594 ACE_TRACE ("ACE_Proactor::proactor_event_loop_done");
596 ACE_MT (ACE_GUARD_RETURN (ACE_Thread_Mutex
, ace_mon
, mutex_
, -1));
598 return this->end_event_loop_
!= 0 ? 1 : 0 ;
602 ACE_Proactor::close (void)
604 // Close the implementation.
605 if (this->implementation ()->close () == -1)
606 ACE_ERROR ((LM_ERROR
,
607 ACE_TEXT ("%N:%l:(%P | %t):%p\n"),
608 ACE_TEXT ("ACE_Proactor::close: implementation close")));
610 // Delete the implementation.
611 if (this->delete_implementation_
)
613 delete this->implementation ();
614 this->implementation_
= 0;
617 // Delete the timer handler.
618 if (this->timer_handler_
)
620 delete this->timer_handler_
;
621 this->timer_handler_
= 0;
624 // Delete the timer queue.
625 if (this->delete_timer_queue_
)
627 delete this->timer_queue_
;
628 this->timer_queue_
= 0;
629 this->delete_timer_queue_
= 0;
636 ACE_Proactor::register_handle (ACE_HANDLE handle
,
637 const void *completion_key
)
639 return this->implementation ()->register_handle (handle
,
644 ACE_Proactor::schedule_timer (ACE_Handler
&handler
,
646 const ACE_Time_Value
&time
)
648 return this->schedule_timer (handler
,
651 ACE_Time_Value::zero
);
655 ACE_Proactor::schedule_repeating_timer (ACE_Handler
&handler
,
657 const ACE_Time_Value
&interval
)
659 return this->schedule_timer (handler
,
666 ACE_Proactor::schedule_timer (ACE_Handler
&handler
,
668 const ACE_Time_Value
&time
,
669 const ACE_Time_Value
&interval
)
672 ACE_Time_Value absolute_time
=
673 this->timer_queue_
->gettimeofday () + time
;
675 // Only one guy goes in here at a time
676 ACE_MT (ACE_GUARD_RETURN (ACE_SYNCH_RECURSIVE_MUTEX
,
678 this->timer_queue_
->mutex (),
681 // Remember the old proactor.
682 ACE_Proactor
*old_proactor
= handler
.proactor ();
684 // Assign *this* Proactor to the handler.
685 handler
.proactor (this);
687 // Schedule the timer
688 long result
= this->timer_queue_
->schedule (&handler
,
694 // no failures: check to see if we are the earliest time
695 if (this->timer_queue_
->earliest_time () == absolute_time
)
697 // wake up the timer thread
698 if (this->timer_handler_
->timer_event_
.signal () == -1)
701 this->timer_queue_
->cancel (result
);
708 // Reset the old proactor in case of failures.
709 handler
.proactor (old_proactor
);
716 ACE_Proactor::cancel_timer (long timer_id
,
718 int dont_call_handle_close
)
720 // No need to singal timer event here. Even if the cancel timer was
721 // the earliest, we will have an extra wakeup.
722 return this->timer_queue_
->cancel (timer_id
,
724 dont_call_handle_close
);
728 ACE_Proactor::cancel_timer (ACE_Handler
&handler
,
729 int dont_call_handle_close
)
731 // No need to signal timer event here. Even if the cancel timer was
732 // the earliest, we will have an extra wakeup.
733 return this->timer_queue_
->cancel (&handler
,
734 dont_call_handle_close
);
738 ACE_Proactor::handle_events (ACE_Time_Value
&wait_time
)
740 return implementation ()->handle_events (wait_time
);
744 ACE_Proactor::handle_events (void)
746 return this->implementation ()->handle_events ();
750 ACE_Proactor::wake_up_dispatch_threads (void)
756 ACE_Proactor::close_dispatch_threads (int)
762 ACE_Proactor::number_of_threads (void) const
764 return this->implementation ()->number_of_threads ();
768 ACE_Proactor::number_of_threads (size_t threads
)
770 this->implementation ()->number_of_threads (threads
);
773 ACE_Proactor::TIMER_QUEUE
*
774 ACE_Proactor::timer_queue (void) const
776 return this->timer_queue_
;
780 ACE_Proactor::timer_queue (TIMER_QUEUE
*tq
)
782 // Cleanup old timer queue.
783 if (this->delete_timer_queue_
)
785 delete this->timer_queue_
;
786 this->delete_timer_queue_
= 0;
792 ACE_NEW (this->timer_queue_
,
794 this->delete_timer_queue_
= 1;
798 this->timer_queue_
= tq
;
799 this->delete_timer_queue_
= 0;
802 // Set the proactor in the timer queue's functor
803 this->timer_queue_
->upcall_functor ().proactor (*this);
807 ACE_Proactor::get_handle (void) const
809 return this->implementation ()->get_handle ();
813 ACE_Proactor::implementation (void) const
815 return this->implementation_
;
819 ACE_Asynch_Read_Stream_Impl
*
820 ACE_Proactor::create_asynch_read_stream (void)
822 return this->implementation ()->create_asynch_read_stream ();
825 ACE_Asynch_Write_Stream_Impl
*
826 ACE_Proactor::create_asynch_write_stream (void)
828 return this->implementation ()->create_asynch_write_stream ();
831 ACE_Asynch_Read_Dgram_Impl
*
832 ACE_Proactor::create_asynch_read_dgram (void)
834 return this->implementation ()->create_asynch_read_dgram ();
837 ACE_Asynch_Write_Dgram_Impl
*
838 ACE_Proactor::create_asynch_write_dgram (void)
840 return this->implementation ()->create_asynch_write_dgram ();
843 ACE_Asynch_Read_File_Impl
*
844 ACE_Proactor::create_asynch_read_file (void)
846 return this->implementation ()->create_asynch_read_file ();
849 ACE_Asynch_Write_File_Impl
*
850 ACE_Proactor::create_asynch_write_file (void)
852 return this->implementation ()->create_asynch_write_file ();
855 ACE_Asynch_Accept_Impl
*
856 ACE_Proactor::create_asynch_accept (void)
858 return this->implementation ()->create_asynch_accept ();
861 ACE_Asynch_Connect_Impl
*
862 ACE_Proactor::create_asynch_connect (void)
864 return this->implementation ()->create_asynch_connect ();
867 ACE_Asynch_Transmit_File_Impl
*
868 ACE_Proactor::create_asynch_transmit_file (void)
870 return this->implementation ()->create_asynch_transmit_file ();
873 ACE_Asynch_Read_Stream_Result_Impl
*
874 ACE_Proactor::create_asynch_read_stream_result
875 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
877 ACE_Message_Block
&message_block
,
878 u_long bytes_to_read
,
884 return this->implementation ()->create_asynch_read_stream_result
896 ACE_Asynch_Write_Stream_Result_Impl
*
897 ACE_Proactor::create_asynch_write_stream_result
898 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
900 ACE_Message_Block
&message_block
,
901 u_long bytes_to_write
,
907 return this->implementation ()->create_asynch_write_stream_result
918 ACE_Asynch_Read_File_Result_Impl
*
919 ACE_Proactor::create_asynch_read_file_result
920 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
922 ACE_Message_Block
&message_block
,
923 u_long bytes_to_read
,
931 return this->implementation ()->create_asynch_read_file_result
944 ACE_Asynch_Write_File_Result_Impl
*
945 ACE_Proactor::create_asynch_write_file_result
946 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
948 ACE_Message_Block
&message_block
,
949 u_long bytes_to_write
,
957 return this->implementation ()->create_asynch_write_file_result
970 ACE_Asynch_Read_Dgram_Result_Impl
*
971 ACE_Proactor::create_asynch_read_dgram_result
972 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
974 ACE_Message_Block
*message_block
,
975 size_t bytes_to_read
,
983 return this->implementation()->create_asynch_read_dgram_result
996 ACE_Asynch_Write_Dgram_Result_Impl
*
997 ACE_Proactor::create_asynch_write_dgram_result
998 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1000 ACE_Message_Block
*message_block
,
1001 size_t bytes_to_write
,
1008 return this->implementation()->create_asynch_write_dgram_result
1020 ACE_Asynch_Accept_Result_Impl
*
1021 ACE_Proactor::create_asynch_accept_result
1022 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1023 ACE_HANDLE listen_handle
,
1024 ACE_HANDLE accept_handle
,
1025 ACE_Message_Block
&message_block
,
1026 u_long bytes_to_read
,
1032 return this->implementation ()->create_asynch_accept_result
1044 ACE_Asynch_Connect_Result_Impl
*
1045 ACE_Proactor::create_asynch_connect_result
1046 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1047 ACE_HANDLE connect_handle
,
1053 return this->implementation ()->create_asynch_connect_result
1062 ACE_Asynch_Transmit_File_Result_Impl
*
1063 ACE_Proactor::create_asynch_transmit_file_result
1064 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1067 ACE_Asynch_Transmit_File::Header_And_Trailer
*header_and_trailer
,
1068 u_long bytes_to_write
,
1071 u_long bytes_per_send
,
1078 return this->implementation ()->create_asynch_transmit_file_result
1094 ACE_Asynch_Result_Impl
*
1095 ACE_Proactor::create_asynch_timer
1096 (ACE_Handler::Proxy_Ptr
&handler_proxy
,
1098 const ACE_Time_Value
&tv
,
1103 return this->implementation ()->create_asynch_timer
1113 ACE_Proactor::proactor_post_wakeup_completions (int how_many
)
1115 return this->implementation ()->post_wakeup_completions (how_many
);
1119 ACE_Proactor::implementation (ACE_Proactor_Impl
*implementation
)
1121 this->implementation_
= implementation
;
1124 ACE_END_VERSIONED_NAMESPACE_DECL
1126 #else /* !ACE_WIN32 || !ACE_HAS_AIO_CALLS */
1128 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
1131 ACE_Proactor::instance (size_t /* threads */)
1137 ACE_Proactor::instance (ACE_Proactor
*)
1143 ACE_Proactor::close_singleton (void)
1148 ACE_Proactor::run_event_loop (void)
1155 ACE_Proactor::run_event_loop (ACE_Time_Value
&)
1162 ACE_Proactor::end_event_loop (void)
1169 ACE_Proactor::event_loop_done (void)
1171 return sig_atomic_t (1);
1174 ACE_END_VERSIONED_NAMESPACE_DECL
1176 #endif /* ACE_HAS_WIN32_OVERLAPPED_IO || ACE_HAS_AIO_CALLS */