MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / WaitResponseForDisplayError

Function WaitResponseForDisplayError

Source/Internal/error.cpp:152–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152ErrorResponse WaitResponseForDisplayError(int error_id) {
153 ErrorResponse ret;
154 bool result = false;
155 while (result == false) {
156 error_queue_mutex.lock();
157 result = (error_return.find(error_id) != error_return.end());
158 error_queue_mutex.unlock();
159 std::this_thread::sleep_for(std::chrono::milliseconds(1));
160 }
161
162 error_queue_mutex.lock();
163 ret = error_return[error_id];
164 error_return.erase(error_return.find(error_id));
165 error_queue_mutex.unlock();
166 return ret;
167}
168
169std::mutex display_error_mutex;
170std::map<std::string, int> error_message_history;

Callers 2

DisplayErrorFunction · 0.85
DisplayMessageFunction · 0.85

Calls 5

lockMethod · 0.45
findMethod · 0.45
endMethod · 0.45
unlockMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected