1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Remove NO_THREADS fallback code, Godot 4 requires thread support

This also removes `OS::can_use_threads` from the public API since it's always
true.
This commit is contained in:
Rémi Verschelde
2022-10-03 10:57:36 +02:00
parent d331b803b8
commit 54418ea659
29 changed files with 13 additions and 561 deletions

View File

@@ -79,10 +79,8 @@ RemoteDebuggerPeerTCP::RemoteDebuggerPeerTCP(Ref<StreamPeerTCP> p_tcp) {
tcp_client = p_tcp;
if (tcp_client.is_valid()) { // Attaching to an already connected stream.
connected = true;
#ifndef NO_THREADS
running = true;
thread.start(_thread_func, this);
#endif
} else {
tcp_client.instantiate();
}
@@ -183,10 +181,8 @@ Error RemoteDebuggerPeerTCP::connect_to_host(const String &p_host, uint16_t p_po
return FAILED;
}
connected = true;
#ifndef NO_THREADS
running = true;
thread.start(_thread_func, this);
#endif
return OK;
}
@@ -208,9 +204,7 @@ void RemoteDebuggerPeerTCP::_thread_func(void *p_ud) {
}
void RemoteDebuggerPeerTCP::poll() {
#ifdef NO_THREADS
_poll();
#endif
// Nothing to do, polling is done in thread.
}
void RemoteDebuggerPeerTCP::_poll() {