コード例 #1
0
ファイル: timer.cpp プロジェクト: Ockin/trogdor-pp
   void Timer::reset() {

      MUTEX_LOCK(game->timerMutex);
      time = 0;
      clearJobs();
      MUTEX_UNLOCK(game->timerMutex);
   }
コード例 #2
0
ファイル: workerthread.cpp プロジェクト: Pandoriaantje/utils
void WorkerThread::stop()
{
    if (m_Thread)
    {
        clearJobs();
        m_Thread.reset();
    }
}
コード例 #3
0
ファイル: moodbar.cpp プロジェクト: gms8994/amarok-1.4
// This is called whenever "Ok" or "Apply" is pressed on the configuration
// dialog.  If the moodbar is disabled, kill the current process and
// clear the queue
void
MoodServer::slotMoodbarPrefs( bool show, bool moodier, int alter, bool withMusic )
{
    if( show == true)
      return;

    (void) moodier;  (void) alter;  (void) withMusic;

    // If we have a current process, kill it.  Cleanup happens in
    // slotJobCompleted() above.  We do *not* want to lock the
    // mutex when calling this!
    if( m_currentProcess != 0 )
      m_currentProcess->kill();

    clearJobs();
}
コード例 #4
0
ファイル: SumJobManager.cpp プロジェクト: leag37/SumEngine
//*************************************************************************************************
// Shut down job manager
//*************************************************************************************************
void JobManager::shutDown(void) 
{
	// Stop the manager
	_runManager = false;

	// Clear the job queue
	clearJobs();

	// Wait for each thread individually and close the handle on it
	for(SUINT i = 0; i < _numWorkerThreads; ++i)
	{
		WaitForSingleObject(_workerThreads[i], INFINITE);
		CloseHandle(_workerThreads[i]);
	}

	free(_workerThreads);
}
コード例 #5
0
ファイル: moodbar.cpp プロジェクト: gms8994/amarok-1.4
// This is called when we decide that the moodbar analyzer is
// never going to work.  Disable further jobs, and let the user
// know about it.  This should only be called when m_currentProcess == 0.
void
MoodServer::setMoodbarBroken( void )
{
    warning() << "Uh oh, it looks like the moodbar analyzer is not going to work"
              << endl;

    Amarok::StatusBar::instance()->longMessage( i18n(
        "The Amarok moodbar analyzer program seems to be broken. "
        "This is probably because the moodbar package is not installed "
        "correctly.  The moodbar package, installation instructions, and "
        "troubleshooting help can be found on the wiki page at <a href='"
        WEBPAGE "'>" WEBPAGE "</a>. "
        "When the problem is fixed, please restart Amarok."),
        KDE::StatusBar::Error );


    m_moodbarBroken = true;
    clearJobs();
}
コード例 #6
0
ファイル: timer.cpp プロジェクト: Ockin/trogdor-pp
   Timer::~Timer() {

      clearJobs();
   }