Use call_deferred when emitting the completed signal, so the handlers run on the main thread.

This commit is contained in:
Relintai 2023-06-05 09:11:39 +02:00
parent 6dc774cf5c
commit 642b5b7159

View File

@ -38,7 +38,7 @@ void ThreadPoolJob::set_complete(const bool value) {
_complete = value;
if (call_signal) {
emit_signal("completed");
call_deferred("emit_signal", "completed");
}
}