这篇教程C++ stopThread函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中stopThread函数的典型用法代码示例。如果您正苦于以下问题:C++ stopThread函数的具体用法?C++ stopThread怎么用?C++ stopThread使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了stopThread函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: encode//---------------------------------------------------------------void threadedEncoding::threadedFunction(){ if(lock()){ encode(fileName, audioFileName, frameRate,compression,exportAudio); unlock(); } stopThread();}
开发者ID:greenbaum,项目名称:GAmuza,代码行数:8,
示例2: stopThread bool Camera::close() { stopThread(); // for some reason waiting for the thread keeps it from // completing, but sleeping then stopping capture is ok. ofSleepMillis(100); stopCapture(); }
开发者ID:luxloop,项目名称:ofxEdsdk,代码行数:7,
示例3: alSourceStopv// ----------------------------------------------------------------------------void ofOpenALSoundPlayer::stop(){ alSourceStopv(channels,&sources[sources.size()-channels]); if(isStreaming){ setPosition(0); stopThread(); }}
开发者ID:3snail,项目名称:openFrameworks,代码行数:8,
示例4: ConsoleInterface// the principal program sequencevoid VisionEngine::start() { if (!interface_) interface_ = new ConsoleInterface(app_name_.c_str()); if (!interface_->openDisplay(this)) { delete interface_; interface_ = new ConsoleInterface(app_name_.c_str()); interface_->openDisplay(this); } if(camera_==NULL ) { interface_->displayError("No camera found!"); return; } if( camera_->startCamera() ) { initFrameProcessors(); startThread(); mainLoop(); stopThread(); } else interface_->displayError("Could not start camera!"); teardownCamera(); freeBuffers();}
开发者ID:mkalten,项目名称:reacTIVision,代码行数:28,
示例5: out//--------------------------------------------------------------// Stops the client thread. You don't really need to do this ever.//--------------------------------------------------------------void mpeClientTCP::stop() { out("Quitting."); stopThread(); if(useMainThread){ ofRemoveListener(ofEvents.draw, this, &mpeClientTCP::draw); }}
开发者ID:Flightphase,项目名称:Most-Pixels-Ever,代码行数:10,
示例6: log//--------------------------------------------------------------// Stops the client thread. You don't really need to do this ever.//--------------------------------------------------------------void ofxMPEClient::stop() { log("Quitting."); stopThread(); if(useMainThread){ ofRemoveListener(ofEvents().draw, this, &ofxMPEClient::draw); }}
开发者ID:brannondorsey,项目名称:ofxMostPixelsEver,代码行数:10,
示例7: stopThread//-------------------------------------------------void ofThread::waitForThread(bool callStopThread, long milliseconds){ if(!threadDone){ // tell thread to stop if(callStopThread){ stopThread(); } // wait for the thread to finish if(isCurrentThread()){ return; // waitForThread should only be called outside thread } if (INFINITE_JOIN_TIMEOUT == milliseconds){ if(thread.joinable()){ try{ thread.join(); }catch(...){} } }else{ // Wait for "joinWaitMillis" milliseconds for thread to finish std::unique_lock<std::mutex> lck(mutex); if(!threadDone && condition.wait_for(lck,std::chrono::milliseconds(milliseconds))==std::cv_status::timeout){ // unable to completely wait for thread } } }}
开发者ID:ConfusedReality,项目名称:pkg_toolkit_openFrameworks,代码行数:28,
示例8: stopThread void Renderinstance::shutdownRenderer() { stopThread(); if (m_pRenderer!=0) delete m_pRenderer; m_pRenderer=0; if ((m_pScene!=0) && (m_pScene!=m_pTestscene)) delete m_pScene; m_pScene=0; if (m_pTestscene!=0) delete m_pTestscene; m_pTestscene=0; }
开发者ID:BackupTheBerlios,项目名称:ovis-svn,代码行数:7,
示例9: stop// ----------------------------------------------------------------------------// Stop the thread and DMX interface//DMX_STATUS AbstractDMXDriver::stop() { if ( !stopThread() ) return DMX_ERROR; // Disconnect interface return dmx_close();}
开发者ID:sthdsnts,项目名称:DMXStudio,代码行数:10,
示例10: stopThread //-------------------------------------------------------------- void threadedClock::stop() { // Stop thread stopThread(); }
开发者ID:furenku,项目名称:kinho,代码行数:8,
示例11: stopThread//-------------------------------------------------void ofThread::waitForThread(bool callStopThread, long milliseconds){ if(thread.isRunning()){ threadBeingWaitedFor = true; // tell thread to stop if(callStopThread){ stopThread(); ofLogVerbose("ofThread") << "- name: " << getThreadName() << " - Signaled to stop."; } // wait for the thread to finish ofLogVerbose("ofThread") << "- name: " << getThreadName() << " - waiting to stop"; if(isCurrentThread()){ ofLogWarning("ofThread") << "- name: " << getThreadName() << " - waitForThread should only be called from outside the this ofThread."; return; } if (INFINITE_JOIN_TIMEOUT == milliseconds){ thread.join(); }else{ // Wait for "joinWaitMillis" milliseconds for thread to finish if(!thread.tryJoin(milliseconds)){ ofLogError("ofThread") << "- name: " << getThreadName() << " - Unable to completely waitForThread."; } } }}
开发者ID:BonjourDpt,项目名称:openFrameworks,代码行数:29,
示例12: stopThreadofxPixelPusherUnit::~ofxPixelPusherUnit() { stopThread(); while (isThreadRunning()) ; udp.Close();}
开发者ID:harujioh,项目名称:ofxPixelPusher,代码行数:7,
示例13: stopThreadvoid ofxColorStream::exit(){ stopThread(); waitForThread(); stream->stop(); stream->destroy();}
开发者ID:eranws,项目名称:ofxOpenNi2,代码行数:8,
示例14: close void close() { stop(); stopThread (6000); deviceOpen = false; recorder = nullptr; player = nullptr; }
开发者ID:oeberhard,项目名称:BAVSN,代码行数:8,
示例15: stopThread //-------------------------------------------------------------- void Reactor::exit(){ if (context != NULL) { stopThread(); libwebsocket_context_destroy(context); context = NULL; } }
开发者ID:griv,项目名称:openTSPS,代码行数:9,
示例16: stopThread//-------------------------------------------------------------------void pbOscReceiver::close(){ _cb = 0; if ( _threaded ) { stopThread(); //TODO - it crashes application! } //oscReceiver.close();}
开发者ID:kuflex,项目名称:KuStudio,代码行数:9,
示例17: DBGNMListener::~NMListener() { DBG(__func__ << ": cleanup thread"); if (isThreadRunning()) { signalThreadShouldExit(); notify(); stopThread(2000); }}
开发者ID:Celti,项目名称:PocketCHIP-pocket-home,代码行数:8,
示例18: clearAnimations// ----------------------------------------------------------------------------//bool AnimationTask::stop(){ clearAnimations(); if ( !stopThread() ) return false; return true;}
开发者ID:sthdsnts,项目名称:DMXStudio,代码行数:11,
示例19: QThreadvoid CryptobullionApplication::startThread(){ coreThread = new QThread(this); CryptobullionCore *executor = new CryptobullionCore(); executor->moveToThread(coreThread); /* communication to and from thread */ connect(executor, SIGNAL(initializeResult(int)), this, SLOT(initializeResult(int))); connect(executor, SIGNAL(shutdownResult(int)), this, SLOT(shutdownResult(int))); connect(executor, SIGNAL(runawayException(QString)), this, SLOT(handleRunawayException(QString))); connect(this, SIGNAL(requestedInitialize()), executor, SLOT(initialize())); connect(this, SIGNAL(requestedShutdown()), executor, SLOT(shutdown())); /* make sure executor object is deleted in its own thread */ connect(this, SIGNAL(stopThread()), executor, SLOT(deleteLater())); connect(this, SIGNAL(stopThread()), coreThread, SLOT(quit())); coreThread->start();}
开发者ID:cryptogenicbonds,项目名称:CryptoBullion-CBX,代码行数:18,
示例20: j_recognize_streamvoid SpeechSystem::destroy(){ if (verbose) printf("SpeechSystem::destroy()/n"); /* calling j_close_stream(recog) at any time will terminate recognition and exit j_recognize_stream() */ j_close_stream(recog); stopThread();}
开发者ID:paulreimer,项目名称:DataFlower,代码行数:9,
示例21: stopThreadSoundBuffer::~SoundBuffer(){ stopThread(); delete m_nextBufferSegmentFillRequest; delete m_nextBufferSegmentFillCompleted; delete m_updatingStream;}
开发者ID:dlbeswick,项目名称:dlbeswick-examples,代码行数:9,
示例22: lock// ----------------------------------------------------------------------------void ofOpenALSoundPlayer::stop(){ if(sources.empty()) return; std::unique_lock<std::mutex> lock(mutex); alSourceStopv(channels,&sources[sources.size()-channels]); if(isStreaming){ setPosition(0); stopThread(); }}
开发者ID:4ker,项目名称:openFrameworks,代码行数:10,
示例23: stopThreadvoid ListFileProvider::refresh(){ stopThread(); clearItems(); if ( !paths_.empty() ) startThread();}
开发者ID:siredblood,项目名称:tree-bumpkin-project,代码行数:9,
示例24: stopThreadbool ofxNetworkSyncClientState::close(){ if(isThreadRunning()){ stopThread(); waitForThread(); } calibrator.close(); server = NULL; tcpServer = NULL;}
开发者ID:danielmorena,项目名称:ofxNetworkSync,代码行数:9,
示例25: stopThreadvoid ofxPS3EyeGrabber::stop(){ stopThread(); if (_cam) { _cam->stop(); }}
开发者ID:nadja,项目名称:nadja.github.io,代码行数:9,
示例26: stopThread//---------------------------------------------------------------------------void ofxKinect::close(){ if(isThreadRunning()){ stopThread(); } usleep(500000); // some time while thread is stopping ... //libusb_exit(NULL);}
开发者ID:flyingoctopus,项目名称:ofxKinectBox2D_makerfaire,代码行数:10,
示例27: stopThreadofxTCPSyncClient::~ofxTCPSyncClient() { stopThread(); if(bTCP) tcpClient.close(); else{ udpSender.Close(); udpReceiver.Close(); }}
开发者ID:nuigroup,项目名称:ccv-multiplexer,代码行数:9,
示例28: close void close() { if (isRunning) { stopThread (2000); isRunning = false; closeDevices(); } }
开发者ID:0x4d52,项目名称:ugen,代码行数:9,
示例29: saveImagevoid ofxMSAThreadedImageSaver::threadedFunction() { if(lock()) { saveImage(fileName); unlock(); } else { printf("ofxMSAThreadedImageSaver - cannot save %s cos I'm locked", fileName.c_str()); } stopThread();}
开发者ID:Giladx,项目名称:msalibs,代码行数:9,
示例30: stopThreadthreadedSerial::~threadedSerial(){ if( isThreadRunning() ) { stopThread(); } // oscSender.clear();}
开发者ID:sschiesser,项目名称:sabreServer,代码行数:9,
注:本文中的stopThread函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ stopTimer函数代码示例 C++ stopSound函数代码示例 |