TEST_F(ObLogCacheTest, AsyncPushAndGetSlowWrite){ slow_write = true; setThreadCount((int)n_reader+1); start(); wait(); ASSERT_EQ(OB_SUCCESS, err); }
void AsyncTaskThread::setThreadParameter(InvalLoader *loader, InvalRetryThread *retry_thread, RequestProcessor *processor, int thread_count, inval_request_storage *req_storage) { this->invalid_loader = loader; this->retry_thread = retry_thread; this->processor = processor; this->request_storage = req_storage; setThreadCount(thread_count); }
dup_sync_sender_manager::dup_sync_sender_manager( tbnet::Transport *transport, tair_packet_streamer *streamer, table_manager* table_mgr) { this->table_mgr = table_mgr; conn_mgr = new tbnet::ConnectionManager(transport, streamer, this); conn_mgr->setDefaultQueueTimeout(0 , MISECONDS_BEFOR_SEND_RETRY/2000); max_queue_size = 0; atomic_set(&packet_id_creater, 0); setThreadCount(MAX_DUP_COUNT); //this->start(); }
ompl::geometric::pRRT::pRRT(const base::SpaceInformationPtr &si) : base::Planner(si, "pRRT"), samplerArray_(si) { specs_.approximateSolutions = true; specs_.multithreaded = true; specs_.directed = true; setThreadCount(2); Planner::declareParam<double>("range", this, &pRRT::setRange, &pRRT::getRange, "0.:1.:10000."); Planner::declareParam<double>("goal_bias", this, &pRRT::setGoalBias, &pRRT::getGoalBias, "0.:.05:1."); Planner::declareParam<unsigned int>("thread_count", this, &pRRT::setThreadCount, &pRRT::getThreadCount, "1:64"); }
ompl::geometric::pSBL::pSBL(const base::SpaceInformationPtr &si) : base::Planner(si, "pSBL"), samplerArray_(si) { specs_.recognizedGoal = base::GOAL_STATE; specs_.multithreaded = true; maxDistance_ = 0.0; setThreadCount(2); connectionPoint_ = std::make_pair<base::State*, base::State*>(nullptr, nullptr); Planner::declareParam<double>("range", this, &pSBL::setRange, &pSBL::getRange, "0.:1.:10000."); Planner::declareParam<unsigned int>("thread_count", this, &pSBL::setThreadCount, &pSBL::getThreadCount, "1:64"); }
// Constructor World::World(Ogre::Real desiredFps, int maxUpdatesPerFrames, Ogre::String name) : m_bodyInAABBIterator(this) { #ifndef WIN32 pthread_mutex_init(&m_ogreMutex, 0); #endif setUpdateFPS(desiredFps, maxUpdatesPerFrames); m_limits = Ogre::AxisAlignedBox(Ogre::Vector3(-100,-100,-100), Ogre::Vector3(100,100,100)); m_world = NewtonCreate(); if (!m_world) { // world not created! } NewtonWorldSetUserData( m_world, this ); // create the default ID. m_defaultMatID = new OgreNewt::MaterialID( this, NewtonMaterialGetDefaultGroupID( m_world ) ); m_leaveCallback = NULL; m_defaultAngularDamping = Ogre::Vector3(0.1f, 0.1f, 0.1f); m_defaultLinearDamping = 0.1f; m_debugger = new Debugger(this); // set the default solve mode to be iterative the fastest setSolverModel (SM_FASTEST); // use the more advanced hardware in the system Ogre::String description; setPlatformArchitecture (3); getPlatformArchitecture (description); // set one tread by default setThreadCount(1); // store the world by name in a static map worlds[name] = this; }
VSThreadPool::VSThreadPool(VSCore *core, int threads) : core(core), activeThreads(0), idleThreads(0), stopThreads(false), ticks(0) { setThreadCount(threads); }
// 线程参数设置 void PacketQueueThread::setThreadParameter(int threadCount, IPacketQueueHandler *handler, void *args) { setThreadCount(threadCount); _handler = handler; _args = args; }
TEST_F(ObQLockTest, CoCurrent){ setThreadCount((int)n_thread); start(); wait(); ASSERT_EQ(0, node.n_err_); }
TEST_F(ObLogCacheTest, AsyncPushAndGet){ setThreadCount((int)n_reader+1); start(); wait(); ASSERT_EQ(OB_SUCCESS, err); }
// threadCount: Integer containing the I/O thread count bool ZeroMQContext::setSlotThreadCount(const base::Integer* const msg) { bool ok = false; if (msg != nullptr) ok = setThreadCount(*msg); return ok; }