Esempio n. 1
0
Ammo::Ammo( const Option* o )
    : Item( o ), fired(false), form(0)
{

    if ( o->type == bul_none )
    {
        doPerform(aPolymorph);
    }
    else for ( int i = 0; i < NUM_ABORT; ++i )
        {
            doPerform(aPolymorph);

            if ( ammoStats::AmmoStats[form].type == o->type)
            {
                break;
            }
        }
}
Esempio n. 2
0
void LLCurl::Multi::perform()
{
	if (mThreaded)
	{
		mSignal->lock();
		if (mPerformState == PERFORM_STATE_READY)
		{
			mSignal->signal();
		}
		mSignal->unlock();
	}
	else
	{
		doPerform();
	}	
}
Esempio n. 3
0
void LLCurl::Multi::run()
{
	llassert(mThreaded);
	
	mSignal->lock();
	while (!mQuitting)
	{
		mSignal->wait();
		mPerformState = PERFORM_STATE_PERFORMING;
		if (!mQuitting)
		{
			LLMutexLock lock(LLCurl::Easy::sMultiMutex);
			doPerform();
		}
	}
	mSignal->unlock();
}
Esempio n. 4
0
bool LLCurl::Multi::waitToComplete()
{
	if(!isValid())
	{
		return true ;
	}

	if(!mMutexp) //not threaded
	{
		doPerform() ;
		return true ;
	}

	bool completed = (STATE_COMPLETED == mState) ;
	if(!completed)
	{
		LLCurl::getCurlThread()->setPriority(mHandle, LLQueuedThread::PRIORITY_HIGH) ;
	}
	
	return completed;
}