diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-03 10:57:36 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-03 11:23:26 +0200 |
commit | 54418ea659061edccdf1ac16470505542dcc33f9 (patch) | |
tree | cf48aba0b9b73277b1ccc01b914646d49881f2a3 /core/debugger | |
parent | d331b803b8e63b0dab406a12c21805a17ee0a6a8 (diff) |
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.
Diffstat (limited to 'core/debugger')
-rw-r--r-- | core/debugger/remote_debugger_peer.cpp | 8 | ||||
-rw-r--r-- | core/debugger/remote_debugger_peer.h | 8 |
2 files changed, 5 insertions, 11 deletions
diff --git a/core/debugger/remote_debugger_peer.cpp b/core/debugger/remote_debugger_peer.cpp index e9362b4ea4..525362ec7c 100644 --- a/core/debugger/remote_debugger_peer.cpp +++ b/core/debugger/remote_debugger_peer.cpp @@ -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() { diff --git a/core/debugger/remote_debugger_peer.h b/core/debugger/remote_debugger_peer.h index 473fd8d712..2ab641d537 100644 --- a/core/debugger/remote_debugger_peer.h +++ b/core/debugger/remote_debugger_peer.h @@ -43,12 +43,12 @@ protected: public: virtual bool is_peer_connected() = 0; + virtual int get_max_message_size() const = 0; virtual bool has_message() = 0; virtual Error put_message(const Array &p_arr) = 0; virtual Array get_message() = 0; virtual void close() = 0; virtual void poll() = 0; - virtual int get_max_message_size() const = 0; virtual bool can_block() const { return true; } // If blocking io is allowed on main thread (debug). RemoteDebuggerPeer(); @@ -81,12 +81,12 @@ public: Error connect_to_host(const String &p_host, uint16_t p_port); - void poll() override; bool is_peer_connected() override; + int get_max_message_size() const override; bool has_message() override; - Array get_message() override; Error put_message(const Array &p_arr) override; - int get_max_message_size() const override; + Array get_message() override; + void poll() override; void close() override; RemoteDebuggerPeerTCP(Ref<StreamPeerTCP> p_stream = Ref<StreamPeerTCP>()); |