MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / finish

Method finish

tools/aapt/WorkQueue.cpp:93–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93status_t WorkQueue::finish() {
94 { // acquire lock
95 AutoMutex _l(mLock);
96
97 if (mFinished) {
98 return INVALID_OPERATION;
99 }
100
101 mFinished = true;
102 mWorkChangedCondition.broadcast();
103 } // release lock
104
105 // It is not possible for the list of work threads to change once the mFinished
106 // flag has been set, so we can access mWorkThreads outside of the lock here.
107 size_t count = mWorkThreads.size();
108 for (size_t i = 0; i < count; i++) {
109 mWorkThreads.itemAt(i)->join();
110 }
111 mWorkThreads.clear();
112 return OK;
113}
114
115bool WorkQueue::threadLoop() {
116 WorkUnit* workUnit;

Callers 4

preProcessImagesFunction · 0.45
deleteObjectMethod · 0.45
onReceiveMethod · 0.45
onCreateMethod · 0.45

Calls 4

broadcastMethod · 0.80
joinMethod · 0.80
sizeMethod · 0.65
clearMethod · 0.65

Tested by 2

deleteObjectMethod · 0.36
onReceiveMethod · 0.36