示例#1
0
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;
}
示例#4
0
	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;
		}
	}
}
示例#6
0
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;
}
示例#7
0
	void Http::stop()
	{
		destroyThread();
	}
示例#8
0
文件: threads.c 项目: Maelan/hanoic
void  endThread
  (Thread* thread)
{
	pthread_cancel(thread->th);
	destroyThread(thread);
}
示例#9
0
文件: threads.c 项目: Maelan/hanoic
void  waitThread
  (Thread* thread)
{
	pthread_join(thread->th, NULL);
	destroyThread(thread);
}
DatabaseImportForm::~DatabaseImportForm(void)
{
	destroyThread();
}
示例#11
0
文件: requests.cpp 项目: jjardon/eos
void RequestManager::deinit() {
	if (!destroyThread())
		warning("RequestManager::deinit(): Requests thread had to be killed");

	clearList();
}
示例#12
0
GameThread::~GameThread() {
	destroyThread();

	delete _game;
}
示例#13
0
文件: thread.cpp 项目: EffWun/xoreos
Thread::~Thread() {
	destroyThread();
}