1 #include "Thread_Task.h"
2 #include "../Scheduler.h"
3 #include "tao/RTScheduling/RTScheduler_Manager.h"
6 ACE_TMAIN(int argc
, ACE_TCHAR
*argv
[])
11 CORBA::ORB_init (argc
,
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);
28 // Wait until all threads are ready.
29 ACE_Thread_Manager::instance ()->wait ();
33 catch (const CORBA::Exception
& ex
)
35 ex
._tao_print_exception ("Caught exception:");