=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / tests / RTScheduling / Current / test.cpp
blobab112932bf84dbd2a2571857bf398573e2ef3e45
1 #include "Thread_Task.h"
2 #include "../Scheduler.h"
3 #include "tao/RTScheduling/RTScheduler_Manager.h"
5 int
6 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
8 try
10 CORBA::ORB_var orb =
11 CORBA::ORB_init (argc,
12 argv);
14 CORBA::Object_var manager_obj = orb->resolve_initial_references ("RTSchedulerManager");
16 TAO_RTScheduler_Manager_var manager = TAO_RTScheduler_Manager::_narrow (manager_obj.in ());
18 TAO_Scheduler scheduler (orb.in ());
20 manager->rtscheduler (&scheduler);
22 Thread_Task task (orb.in ());
24 task.activate_task (4);
26 orb->run ();
28 // Wait until all threads are ready.
29 ACE_Thread_Manager::instance ()->wait ();
31 orb->destroy ();
33 catch (const CORBA::Exception& ex)
35 ex._tao_print_exception ("Caught exception:");
36 return 1;
39 return 0;