#include <llworkerthread.h>
Inheritance diagram for LLWorkerClass:
Definition at line 117 of file llworkerthread.h.
Definition at line 122 of file llworkerthread.h.
enum LLWorkerClass::FLAGS |
WCF_HAVE_WORK | |
WCF_WORKING | |
WCF_WORK_FINISHED | |
WCF_WORK_ABORTED | |
WCF_DELETE_REQUESTED | |
WCF_ABORT_REQUESTED |
Definition at line 123 of file llworkerthread.h.
LLWorkerClass::LLWorkerClass | ( | LLWorkerThread * | workerthread, | |
const std::string & | name | |||
) |
LLWorkerClass::~LLWorkerClass | ( | ) | [virtual] |
Definition at line 196 of file llworkerthread.cpp.
References LLQueuedThread::getRequest(), LLQueuedThread::QueuedRequest::getStatus(), llassert_always, llendl, llerrs, mRequestHandle, mWorkerThread, mWorkFlags, LLQueuedThread::nullHandle(), LLQueuedThread::STATUS_ABORTED, LLQueuedThread::STATUS_COMPLETE, WCF_DELETE_REQUESTED, and WCF_WORKING.
void LLWorkerClass::abortWork | ( | bool | autocomplete | ) | [protected] |
Definition at line 292 of file llworkerthread.cpp.
References LLQueuedThread::abortRequest(), LLMutex::lock(), mMutex, mRequestHandle, mWorkerThread, LLQueuedThread::nullHandle(), LLQueuedThread::PRIORITY_IMMEDIATE, setFlags(), LLQueuedThread::setPriority(), LLMutex::unlock(), and WCF_ABORT_REQUESTED.
void LLWorkerClass::addWork | ( | S32 | param, | |
U32 | priority = LLWorkerThread::PRIORITY_NORMAL | |||
) | [protected] |
Definition at line 274 of file llworkerthread.cpp.
References LLWorkerThread::addWorkRequest(), clearFlags(), llassert_always, llendl, llerrs, LLMutex::lock(), mMutex, mRequestHandle, mWorkerThread, mWorkFlags, LLQueuedThread::nullHandle(), setFlags(), startWork(), LLMutex::unlock(), WCF_HAVE_WORK, WCF_WORK_ABORTED, WCF_WORK_FINISHED, and WCF_WORKING.
Referenced by LLTextureFetch::createRequest(), LLTextureFetch::getRequestFinished(), LLTextureFetchWorker::LLTextureFetchWorker(), LLTextureCacheWorker::read(), LLImageWorker::requestDecodedAuxData(), LLTextureFetchWorker::setDesiredDiscard(), and LLTextureCacheWorker::write().
bool LLWorkerClass::checkWork | ( | bool | aborting = false |
) | [protected] |
Definition at line 310 of file llworkerthread.cpp.
References clearFlags(), LLQueuedThread::completeRequest(), endWork(), LLQueuedThread::FLAG_ABORT, getFlags(), LLQueuedThread::QueuedRequest::getFlags(), LLWorkerThread::WorkRequest::getParam(), LLQueuedThread::getRequest(), LLQueuedThread::QueuedRequest::getStatus(), llassert_always, mMutex, mRequestHandle, mWorkerThread, LLQueuedThread::nullHandle(), LLQueuedThread::STATUS_ABORTED, LLQueuedThread::STATUS_COMPLETE, WCF_HAVE_WORK, and WCF_WORKING.
Referenced by LLTextureCacheWorker::complete(), LLTextureFetch::getRequestFinished(), and LLImageWorker::requestDecodedAuxData().
Definition at line 179 of file llworkerthread.h.
References mWorkFlags.
Referenced by addWork(), checkWork(), and setWorking().
bool LLWorkerClass::deleteOK | ( | ) | [virtual] |
Reimplemented in LLTextureFetchWorker.
Definition at line 234 of file llworkerthread.cpp.
Referenced by LLWorkerThread::update().
virtual bool LLWorkerClass::doWork | ( | S32 | param | ) | [pure virtual] |
Implemented in LLImageWorker, LLTextureCacheWorker, and LLTextureFetchWorker.
Referenced by LLWorkerThread::WorkRequest::processRequest().
Implemented in LLImageWorker, LLTextureCacheWorker, and LLTextureFetchWorker.
Referenced by checkWork().
Reimplemented in LLTextureCacheWorker, and LLTextureFetchWorker.
Definition at line 229 of file llworkerthread.cpp.
Referenced by LLWorkerThread::WorkRequest::finishRequest().
bool LLWorkerClass::getFlags | ( | U32 | flags | ) | [inline, private] |
U32 LLWorkerClass::getFlags | ( | ) | [inline, private] |
Definition at line 180 of file llworkerthread.h.
References mWorkFlags.
Referenced by checkWork(), haveWork(), isWorking(), scheduleDelete(), LLWorkerThread::update(), wasAborted(), and yield().
const std::string& LLWorkerClass::getName | ( | ) | const [inline] |
U32 LLWorkerClass::getPriority | ( | ) | [inline] |
Definition at line 153 of file llworkerthread.h.
References mRequestPriority.
Referenced by LLTextureFetch::getFetchState(), and LLTextureFetchWorker::setImagePriority().
bool LLWorkerClass::haveWork | ( | ) | [inline] |
Definition at line 147 of file llworkerthread.h.
References getFlags(), and WCF_HAVE_WORK.
Referenced by LLTextureFetch::createRequest(), LLTextureFetchWorker::deleteOK(), LLTextureFetch::getFetchState(), LLTextureFetch::getRequestFinished(), LLImageWorker::requestDecodedAuxData(), LLTextureFetchWorker::setDesiredDiscard(), LLTextureCacheWorker::~LLTextureCacheWorker(), and LLTextureFetchWorker::~LLTextureFetchWorker().
bool LLWorkerClass::isWorking | ( | ) | [inline] |
void LLWorkerClass::scheduleDelete | ( | ) |
Definition at line 348 of file llworkerthread.cpp.
References LLWorkerThread::deleteWorker(), getFlags(), LLMutex::lock(), mMutex, mWorkerThread, setFlags(), LLMutex::unlock(), and WCF_DELETE_REQUESTED.
Referenced by LLTextureFetchWorker::decodeImage(), LLTextureFetchWorker::endWork(), LLTextureFetch::removeRequest(), and LLTextureFetchWorker::~LLTextureFetchWorker().
Definition at line 178 of file llworkerthread.h.
References mWorkFlags.
Referenced by abortWork(), addWork(), LLWorkerThread::WorkRequest::finishRequest(), scheduleDelete(), and setWorking().
Definition at line 364 of file llworkerthread.cpp.
References LLMutex::lock(), mMutex, mRequestHandle, mRequestPriority, mWorkerThread, LLQueuedThread::nullHandle(), LLQueuedThread::setPriority(), and LLMutex::unlock().
Referenced by LLTextureFetchWorker::callbackCacheRead(), LLTextureFetchWorker::callbackCacheWrite(), LLTextureFetchWorker::callbackDecoded(), LLTextureFetchWorker::callbackHttpGet(), LLTextureFetchWorker::callbackURLReceived(), LLTextureCacheWorker::doRead(), LLTextureFetchWorker::doWork(), LLTextureCacheWorker::doWrite(), LLTextureCacheWorker::ioComplete(), LLTextureFetch::receiveImageHeader(), LLTextureFetch::receiveImagePacket(), LLTextureFetchWorker::setDesiredDiscard(), and LLTextureFetchWorker::setImagePriority().
void LLWorkerClass::setWorkerThread | ( | LLWorkerThread * | workerthread | ) | [protected] |
Definition at line 215 of file llworkerthread.cpp.
References llendl, llerrs, LLMutex::lock(), mMutex, mRequestHandle, mWorkerThread, LLQueuedThread::nullHandle(), and LLMutex::unlock().
void LLWorkerClass::setWorking | ( | bool | working | ) | [protected] |
Definition at line 242 of file llworkerthread.cpp.
References clearFlags(), llassert_always, LLMutex::lock(), mMutex, mWorkFlags, setFlags(), LLMutex::unlock(), and WCF_WORKING.
Referenced by LLWorkerThread::WorkRequest::processRequest().
Implemented in LLImageWorker, LLTextureCacheWorker, and LLTextureFetchWorker.
Referenced by addWork().
bool LLWorkerClass::wasAborted | ( | ) | [inline] |
Definition at line 149 of file llworkerthread.h.
References getFlags(), and WCF_ABORT_REQUESTED.
Referenced by LLTextureFetch::createRequest(), LLImageWorker::doWork(), and LLTextureFetch::getRequestFinished().
bool LLWorkerClass::yield | ( | ) | [protected] |
Definition at line 260 of file llworkerthread.cpp.
References LLThread::checkPause(), getFlags(), LLMutex::lock(), mMutex, mWorkerThread, LLMutex::unlock(), WCF_ABORT_REQUESTED, and LLThread::yield().
friend class LLWorkerThread [friend] |
Definition at line 119 of file llworkerthread.h.
friend class LLWorkerThread::WorkRequest [friend] |
Definition at line 120 of file llworkerthread.h.
LLMutex LLWorkerClass::mMutex [private] |
Definition at line 195 of file llworkerthread.h.
Referenced by abortWork(), addWork(), checkWork(), scheduleDelete(), setPriority(), setWorkerThread(), setWorking(), and yield().
handle_t LLWorkerClass::mRequestHandle [protected] |
Definition at line 191 of file llworkerthread.h.
Referenced by abortWork(), addWork(), checkWork(), LLTextureCacheWorker::doRead(), LLTextureCacheWorker::doWrite(), LLTextureCacheWorker::read(), setPriority(), setWorkerThread(), LLTextureCacheWorker::write(), and ~LLWorkerClass().
U32 LLWorkerClass::mRequestPriority [protected] |
std::string LLWorkerClass::mWorkerClassName [protected] |
LLWorkerThread* LLWorkerClass::mWorkerThread [protected] |
Definition at line 189 of file llworkerthread.h.
Referenced by abortWork(), addWork(), checkWork(), LLWorkerClass(), scheduleDelete(), setPriority(), setWorkerThread(), yield(), and ~LLWorkerClass().
LLAtomicU32 LLWorkerClass::mWorkFlags [private] |
Definition at line 196 of file llworkerthread.h.
Referenced by addWork(), clearFlags(), getFlags(), setFlags(), setWorking(), and ~LLWorkerClass().