mirror of
https://github.com/open-goal/jak-project
synced 2026-07-03 21:10:50 -04:00
[jak2] goalc supports multiple projects (#1619)
* [jak2] goalc supports multiple projects * disable deci2 server if not debugging
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user