MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / waitFinished

Method waitFinished

src/ThreadPool.h:101–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99 }
100
101 bool waitFinished() {
102
103
104 #ifdef _WIN32
105//x32 Windows definitions
106 Sleep(WAIT_USECONDS);
107#else
108//other platforms
109 usleep(WAIT_USECONDS);
110#endif
111
112 usleep(WAIT_USECONDS);
113 pthread_mutex_lock(&mp);
114 if (state == FINISHED) {
115 pthread_mutex_unlock(&mp);
116 return true;
117 }
118 pthread_mutex_unlock(&mp);
119 return false;
120 }
121
122 unsigned int getNumber() const {return num;}
123 pthread_t getThreadSelf() const {return tid;}

Callers 1

isOneThreadFinishedMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected