MCPcopy Create free account
hub / github.com/bumptop/BumpTop / join

Method join

trunk/win/Source/BT_ThreadableUnit.cpp:117–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void ThreadableUnit::join(int killAfterMillis)
118{
119 // wait until it is safe to terminate
120 int count = 0;
121 while ((getState() == Processing) &&
122 ((count < killAfterMillis) || (killAfterMillis < 0)))
123 {
124 Sleep(32);
125 count += 32;
126 }
127
128 if (getState() == ProcessingIdle ||
129 killAfterMillis > -1)
130 {
131 _mutex.lock();
132 if (_thread)
133 {
134 TerminateThread(_thread, 0);
135 CloseHandle(_thread);
136 }
137 _thread = NULL;
138 _state = Complete;
139 _mutex.unlock();
140 }
141}
142
143ThreadableUnit::State ThreadableUnit::getState()
144{

Callers 15

buildProjectOutputsFunction · 0.45
createBuildDirectoryFunction · 0.45
validateReleaseVersionFunction · 0.45
alterResourceVersionFunction · 0.45
alterReleaseFilesFunction · 0.45
alterReleaseVersionFunction · 0.45
generateMD5sFunction · 0.45
preprocessFilesFunction · 0.45
postprocessFilesFunction · 0.45
buildSevenZipFunction · 0.45
buildBumpTopInstallerFunction · 0.45

Calls 2

lockMethod · 0.45
unlockMethod · 0.45

Tested by 1

modifyFileWithNameMethod · 0.36