Exemple #1
0
Smt_Uint TBaseDevice::Run()
{
	m_IsThreadRun = Smt_BoolTRUE;
	water_marks( 1, 16 * 1024 );	//SET_LWM
	water_marks( 3, 1024 * 1024 );	//SET_HWM
	
	// start thread pool
	return activate(THR_NEW_LWP|THR_JOINABLE, 1, 0, ACE_DEFAULT_THREAD_PRIORITY, -1, this, 0, 0, 0, m_ThreadNames);
}
Exemple #2
0
int Forwarder::open(void *)
{
    ACE_TRACE(ACE_TEXT ("Forwarder::open()"));

    water_marks(ACE_IO_Cntl_Msg::SET_HWM, 
            (size_t) (queue_depth_ * sizeof(Package *) - 1));
    //ACE_DEBUG((LM_DEBUG, "High water mark is %d bytes.\n", 
    //            msg_queue()->high_water_mark()));

    // Activate task
    // As the worker thread will delete the object on completion,
    // and the main thread will not wait on this, we create
    // the worker as THR_DETACHED to ensure the thread resources
    // are released.
    activate(THR_NEW_LWP | THR_DETACHED | THR_INHERIT_SCHED);

    return 0;
}