use uevent in transfer loops to reduce latency between exiting and updating progress time.

This commit is contained in:
ITotalJustice
2025-07-19 18:33:47 +01:00
parent 159abfa246
commit 4421ac1ceb
4 changed files with 189 additions and 24 deletions

View File

@@ -64,6 +64,11 @@ struct ProgressBox final : Widget {
};
}
// auto-clear = false
auto GetCancelEvent() {
return &m_uevent;
}
private:
void FreeImage();
@@ -75,6 +80,7 @@ public:
};
private:
UEvent m_uevent{};
Mutex m_mutex{};
Thread m_thread{};
ThreadData m_thread_data{};