job_i.cpp
来自「这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用」· C++ 代码 · 共 60 行
CPP
60 行
//Job_i.cpp,v 1.3 2002/01/29 20:20:41 okellogg Exp
#include "Job_i.h"
#include "tao/debug.h"
#include "ace/Arg_Shifter.h"
#include "Activity.h"
Job_i::Job_i ()
{
}
const ACE_CString&
Job_i::name (void)
{
return job_name_;
}
const ACE_CString&
Job_i::poa (void)
{
return POA_name_;
}
int
Job_i::init (ACE_Arg_Shifter& arg_shifter)
{
job_name_ = arg_shifter.get_current (); // Read the name of the Job
arg_shifter.consume_arg ();
POA_name_ = arg_shifter.get_current (); // Read the name of the POA
arg_shifter.consume_arg ();
return 0;
}
void
Job_i::work (CORBA::ULong work ACE_ENV_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
static CORBA::ULong prime_number = 9619;
if (TAO_debug_level > 0)
ACE_DEBUG ((LM_DEBUG,
"test_i::method: %hd units of work\n",
work));
for (; work != 0; work--)
ACE::is_prime (prime_number,
2,
prime_number / 2);
}
void
Job_i::shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
ACE_THROW_SPEC ((CORBA::SystemException))
{
ACTIVITY::instance()->job_ended (this);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?