void Application::stopThreads() { destroyThread(mPixelDecodeThread, nop<ThreadBlock>); destroyThread(mDMTXThread, deleter<Frame>); destroyThread(mDMTXInstrThread, DMTXDecode::finished); }
void DatabaseImportForm::captureThreadError(Exception e) { QPixmap ico; QTreeWidgetItem *item=nullptr; if(!create_model) model_wgt->rearrangeSchemas(QPointF(origin_sb->value(), origin_sb->value()), tabs_per_row_sb->value(), sch_per_row_sb->value(), obj_spacing_sb->value()); destroyModelWidget(); finishImport(trUtf8("Importing process aborted!")); ico=QPixmap(PgModelerUiNS::getIconPath("msgbox_erro")); ico_lbl->setPixmap(ico); item=PgModelerUiNS::createOutputTreeItem(output_trw, PgModelerUiNS::formatMessage(e.getErrorMessage()), ico, nullptr, false, true); PgModelerUiNS::createExceptionsTree(output_trw, e, item); //Destroy the current import thread and helper to avoid reuse destroyThread(); //Recreates a new import thread and helper to force user to reconfigure the import createThread(); database_cmb->setCurrentIndex(0); throw Exception(e.getErrorMessage(), e.getErrorType(),__PRETTY_FUNCTION__,__FILE__,__LINE__, &e); }
TSShapeInstance::~TSShapeInstance() { mMeshObjects.clear(); while (mThreadList.size()) destroyThread(mThreadList.last()); setMaterialList(NULL); delete [] mDirtyFlags; }
void Http::get(const String &filename, const String &url) { destroyThread(); this->filename = filename; String tmp = url; if (tmp.startsWith("http://")) tmp.erase(0, 7); this->servername = Substr(tmp, 0, tmp.find_first_of("/")); tmp.erase(0, this->servername.size()); this->_request = tmp; bStop = false; pos = 0; size = 0; start(); }
void stopListeningThread( PAPIConnection * inConnection, PAPIStatus * outStatus) { *outStatus = PAPISuccess; if ( getListenerThreadStatus( inConnection ) == RUNNING ) { if ( lockMutex( inConnection->mListenersMutex ) == 0 ) { destroyThread( inConnection->mListenerThread ); papiClose( inConnection->mFD ); unlockMutex( inConnection->mListenersMutex ); } else { *outStatus = PAPIUnknownFailure; } } }
void SoundManager::deinit() { if (!_ready) return; if (!destroyThread()) warning("SoundManager::deinit(): Sound thread had to be killed"); for (uint16 i = 1; i < kChannelCount; i++) freeChannel(i); if (_hasSound) { alcMakeContextCurrent(0); alcDestroyContext(_ctx); alcCloseDevice(_dev); } _ready = false; }
void Http::stop() { destroyThread(); }
void endThread (Thread* thread) { pthread_cancel(thread->th); destroyThread(thread); }
void waitThread (Thread* thread) { pthread_join(thread->th, NULL); destroyThread(thread); }
DatabaseImportForm::~DatabaseImportForm(void) { destroyThread(); }
void RequestManager::deinit() { if (!destroyThread()) warning("RequestManager::deinit(): Requests thread had to be killed"); clearList(); }
GameThread::~GameThread() { destroyThread(); delete _game; }
Thread::~Thread() { destroyThread(); }