MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _thread_func

Method _thread_func

scene/main/http_request.cpp:173–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void HTTPRequest::_thread_func(void *p_userdata) {
174 HTTPRequest *hr = static_cast<HTTPRequest *>(p_userdata);
175
176 Error err = hr->_request();
177
178 if (err != OK) {
179 hr->_defer_done(RESULT_CANT_CONNECT, 0, PackedStringArray(), PackedByteArray());
180 } else {
181 while (!hr->thread_request_quit.is_set()) {
182 bool exit = hr->_update_connection();
183 if (exit) {
184 break;
185 }
186 OS::get_singleton()->delay_usec(1);
187 }
188 }
189
190 hr->thread_done.set();
191}
192
193void HTTPRequest::cancel_request() {
194 timer->stop();

Callers

nothing calls this directly

Calls 6

_defer_doneMethod · 0.80
_update_connectionMethod · 0.80
_requestMethod · 0.45
is_setMethod · 0.45
delay_usecMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected