summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
75fdb5f)
Change-Id: I948c61ab962bd1469cafae82c7ee5c8709c722f0
LoadingTask* CompleteQueue::NextTask()
{
LoadingTask* CompleteQueue::NextTask()
{
- while( mTasks.Empty() )
+ // Lock while popping task out from the queue
+ Mutex::ScopedLock lock( mMutex );
+
+ if( mTasks.Empty() )
- // Lock while popping task out from the queue
- Mutex::ScopedLock lock( mMutex );
-
Vector< LoadingTask* >::Iterator next = mTasks.Begin();
LoadingTask* nextTask = *next;
mTasks.Erase( next );
Vector< LoadingTask* >::Iterator next = mTasks.Begin();
LoadingTask* nextTask = *next;
mTasks.Erase( next );