예제 #1
0
파일: TSS.cpp 프로젝트: DOCGroup/ACE_TAO
int ACE_TMAIN (int, ACE_TCHAR *[])
{
  HA_CommandHandler handler;
  handler.activate (THR_NEW_LWP | THR_JOINABLE, 5);
  handler.wait ();
  return 0;
}
예제 #2
0
파일: Tokens.cpp 프로젝트: asdlei00/ACE
int ACE_TMAIN (int, ACE_TCHAR *[])
{
  HA_Device_Repository rep;
  HA_CommandHandler handler (rep);
  handler.activate (THR_NEW_LWP | THR_JOINABLE,
                    HA_CommandHandler::N_THREADS);
  handler.wait ();
  return 0;
}
예제 #3
0
파일: Start_Hook.cpp 프로젝트: CCJY/ACE
// Listing 2 code/ch13
int ACE_TMAIN (int, ACE_TCHAR *[])
{
  HA_ThreadHook hook;
  ACE_Thread_Hook::thread_hook (&hook);

  HA_CommandHandler handler;
  handler.activate ();
  handler.wait();
  return 0;
}
예제 #4
0
int ACE_TMAIN (int, ACE_TCHAR *[])
{
  ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%t) Main Thread running\n")));
// Listing 1 code/ch13
  HA_CommandHandler handler;
  int result = handler.activate (THR_NEW_LWP | 
                                 THR_JOINABLE |  
                                 THR_SUSPENDED);
  ACE_ASSERT (result == 0);

  ACE_UNUSED_ARG (result);

  ACE_DEBUG ((LM_DEBUG,
              ACE_TEXT ("(%t) The current thread count is %d\n"),
              handler.thr_count ()));
  ACE_DEBUG ((LM_DEBUG,
              ACE_TEXT ("(%t) The group identifier is %d\n"),
              handler.grp_id ()));
  handler.resume ();
  handler.wait ();
// Listing 1 
  return 0;
}