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

Method stop

editor/inspector/editor_resource_preview.cpp:593–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591}
592
593void EditorResourcePreview::stop() {
594 if (is_threaded()) {
595 if (thread.is_started()) {
596 exiting.set();
597 preview_sem.post();
598
599 for (int i = 0; i < preview_generators.size(); i++) {
600 preview_generators.write[i]->abort();
601 }
602
603 while (!exited.is_set()) {
604 // Sync pending work.
605 OS::get_singleton()->delay_usec(10000);
606 RenderingServer::get_singleton()->sync();
607 MessageQueue::get_singleton()->flush();
608 }
609
610 thread.wait_to_finish();
611 }
612 }
613}
614
615EditorResourcePreview::EditorResourcePreview() {
616 singleton = this;

Callers 7

_playMethod · 0.45
_stopMethod · 0.45
_reset_animationMethod · 0.45
_notificationMethod · 0.45
generateMethod · 0.45

Calls 10

sizeMethod · 0.65
is_startedMethod · 0.45
setMethod · 0.45
postMethod · 0.45
abortMethod · 0.45
is_setMethod · 0.45
delay_usecMethod · 0.45
syncMethod · 0.45
flushMethod · 0.45
wait_to_finishMethod · 0.45

Tested by 1

_notificationMethod · 0.36