[jak2] goalc supports multiple projects (#1619)

* [jak2] goalc supports multiple projects

* disable deci2 server if not debugging
This commit is contained in:
water111
2022-07-06 21:18:08 -04:00
committed by GitHub
parent 8a18072d97
commit 28a2ecdfd3
29 changed files with 239 additions and 81 deletions
+13 -4
View File
@@ -66,11 +66,20 @@ bool Deci2Server::is_client_connected() {
* Wait for protocols to become ready.
* This avoids the case where we receive messages before protocol handlers are set up.
*/
void Deci2Server::wait_for_protos_ready() {
if (protocols_ready)
return;
bool Deci2Server::wait_for_protos_ready() {
if (protocols_ready || want_shutdown) {
return !want_shutdown;
}
std::unique_lock<std::mutex> lk(server_mutex);
cv.wait(lk, [&] { return protocols_ready; });
cv.wait(lk, [&] { return protocols_ready || want_shutdown; });
return !want_shutdown;
}
void Deci2Server::send_shutdown() {
lock();
want_shutdown = true;
unlock();
cv.notify_all();
}
/*!