refactor: load images in workers and push immediately (#5431)

This commit is contained in:
nerix
2024-06-02 16:31:17 +02:00
committed by GitHub
parent b6dc5d9e03
commit d00cadf4eb
5 changed files with 260 additions and 284 deletions
+9
View File
@@ -70,4 +70,13 @@ static void runInGuiThread(F &&fun)
}
}
template <typename F>
inline void postToGuiThread(F &&fun)
{
assert(!isGuiThread() &&
"postToGuiThread must be called from a non-GUI thread");
postToThread(std::forward<F>(fun));
}
} // namespace chatterino