Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / examples / Timer_Queue / main_thread_custom_handler.cpp
blobf70cb1ae1505e23a56aea06d6d0f5ccdb21997d0
1 //=============================================================================
2 /**
3 * @file main_thread_custom_handler.cpp
5 * Implements a threaded timer queue.
6 * This code exercises the Timer_Queue_Test_Driver class using
7 * threads.
8 * It also uses custom event handlers for timer events.
10 * @author Douglas Schmidt <d.schmidt@vanderbilt.edu> && Sergio Flores-Gaitan <sergio@cs.wustl.edu> && Alon Diamant <diamant.alon@gmail.com>
12 //=============================================================================
15 #include "ace/OS_main.h"
16 #include "Driver.h"
17 #include "Thread_Timer_Queue_Custom_Handler_Test.h"
18 #include <memory>
20 typedef Timer_Queue_Test_Driver<Thread_Timer_Queue,
21 Custom_Handler_Input_Task,
22 Custom_Handler_Input_Task::ACTION>
23 THREAD_TIMER_QUEUE_TEST_DRIVER;
25 int
26 ACE_TMAIN (int, ACE_TCHAR *[])
28 // unique ptr ensures that the driver memory is released
29 // automatically.
30 THREAD_TIMER_QUEUE_TEST_DRIVER *tqtd = 0;
31 ACE_NEW_RETURN (tqtd, Thread_Timer_Queue_Custom_Handler_Test, -1);
33 std::unique_ptr <THREAD_TIMER_QUEUE_TEST_DRIVER> driver (tqtd);
35 return driver->run_test ();