MCPcopy Create free account
hub / github.com/beefytech/Beef / Run

Method Run

IDEHelper/Linker/BlCodeView.cpp:79–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void BlCvTypeWorkThread::Run()
80{
81 // Any failure is instant-abort
82 while (!mCodeView->mContext->mFailed)
83 {
84 BlCvTypeSource* typeSource = NULL;
85
86 mCritSect.Lock();
87 if (!mTypeSourceWorkQueue.empty())
88 {
89 typeSource = mTypeSourceWorkQueue.front();
90 mTypeSourceWorkQueue.pop_front();
91 }
92 mCritSect.Unlock();
93
94 if (typeSource == NULL)
95 {
96 if (mTypesDone)
97 break;
98
99 BP_ZONE("Waiting");
100 mWorkEvent.WaitFor();
101 continue;
102 }
103
104 BF_ASSERT(!typeSource->mIsDone);
105
106 if (typeSource->mTypeServerLib != NULL)
107 {
108 BP_ZONE("Load TypeServerLib");
109 if (!typeSource->mTypeServerLib->Load(typeSource->mTypeServerLib->mFileName))
110 {
111 mCodeView->mContext->Fail(StrFormat("Failed to load: %s", typeSource->mTypeServerLib->mFileName.c_str()));
112 }
113 }
114 else
115 {
116 BP_ZONE("Load Obj");
117 typeSource->mTPI.ScanTypeData();
118 typeSource->mTPI.ParseTypeData();
119 }
120 typeSource->mIsDone = true;
121 //typeSource->mDoneSignal.Set();
122
123 // The module work thread may be waiting for this type source
124 mCodeView->mModuleWorkThread.mWorkEvent.Set();
125 }
126
127 // Wake up module work thread
128 mThreadDone = true;
129 mCodeView->mModuleWorkThread.mWorkEvent.Set();
130}
131
132void BlCvTypeWorkThread::Add(BlCvTypeSource* typeSource)
133{

Callers

nothing calls this directly

Calls 14

frontMethod · 0.80
WaitForMethod · 0.80
ScanTypeDataMethod · 0.80
CreateModuleStreamMethod · 0.80
WaitForFinishMethod · 0.80
DoFinishMethod · 0.80
LockMethod · 0.45
emptyMethod · 0.45
UnlockMethod · 0.45
LoadMethod · 0.45
FailMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected